pub unsafe extern "C" fn s2n_config_set_monotonic_clock(
    config: *mut s2n_config,
    clock_fn: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut u64) -> i32>,
    ctx: *mut c_void
) -> i32
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