Function s2n_quic::provider::tls::default::ffi::s2n_config_set_wall_clock

source ยท
pub unsafe extern "C" fn s2n_config_set_wall_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 the system time. The time returned should be the number of nanoseconds since the Unix epoch (Midnight, January 1st, 1970).

s2n-tls uses this clock for timestamps.

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