Function s2n_tls_sys::s2n_config_set_monotonic_clock

source ·
pub unsafe extern "C" fn s2n_config_set_monotonic_clock(
    config: *mut s2n_config,
    clock_fn: s2n_clock_time_nanoseconds,
    ctx: *mut c_void
) -> c_int
Expand description

Allows the caller to set a callback function that will be used to get monotonic time. The monotonic time is the time since an arbitrary, unspecified point. Unlike wall clock time, it MUST never move backwards.

s2n-tls uses this clock for timers.

@param config The configuration object being updated @param clock_fn The monotonic time callback function @param ctx An opaque pointer that the callback will be invoked with @returns S2N_SUCCESS on success. S2N_FAILURE on failure