Function gnunet_sys::GNUNET_TIME_absolute_get_monotonic[][src]

pub unsafe extern "C" fn GNUNET_TIME_absolute_get_monotonic(
    cfg: *const GNUNET_CONFIGURATION_Handle
) -> GNUNET_TIME_Absolute

Obtain the current time and make sure it is monotonically increasing. Guards against systems without an RTC or clocks running backwards and other nasty surprises. Does not guarantee that the returned time is near the current time returned by #GNUNET_TIME_absolute_get(). Two subsequent calls (within a short time period) may return the same value. Persists the last returned time on disk to ensure that time never goes backwards. As a result, the resulting value can be used to check if a message is the “most recent” value and replays of older messages (from the same origin) would be discarded.

@param cfg configuration, used to determine where to store the time; user can also insist RTC is working nicely and disable the feature @return monotonically increasing time