Function sys_clock_getrtoffset

Source
pub unsafe extern "C" fn sys_clock_getrtoffset(tp: *mut timespec)
Expand description

@brief Get the offset @ref SYS_CLOCK_REALTIME with respect to @ref SYS_CLOCK_MONOTONIC

The “wall clock” (i.e. @ref SYS_CLOCK_REALTIME) depends on a base time that is set by the system. The base time may be updated for a number of reasons, such as initialization of a hardware real-time-clock (RTC), network time protocol (NTP) synchronization, or manual adjustment by the application.

This function retrieves the current time offset, as a timespec object, for @ref SYS_CLOCK_REALTIME, with respect to @ref SYS_CLOCK_MONOTONIC, and writes it to the provided memory location pointed-to by @a tp.

@note This function may assert if @a tp is NULL.

@param tp Pointer to memory where time will be written.