Pre-Submission Checklist

Type Of Change

Checklist:

Description

Sometime is helpful to have a monotonic timer to attach to events in order to discard out-of-order ones on receiving side. Current time values are not ideal since are subject to clock skews, adjustment and so on. Since we have system monotonic clock we can use that value to have a monotonic counter.

To be 100% fair CLOCK_MONOTONIC can still be skewed only by ntp adjustment, that's why we try to use CLOCK_MONOTONIC_RAW which is linux-only (afaik) that do not suffer from such adjustments.

The new pseudovariable is $TV(Sm), which returns the monotonic counter as a string. Note that even if is based on clock, it starts from an unspecified point in time, so should really be treated as an always increasing counter.


You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3191

Commit Summary

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/3191@github.com>