Skip to main content

Module adjtime

Module adjtime 

Source
Expand description

Safe wrappers over the POSIX / Linux NTP kernel clock-adjustment APIs: adjtimex(2) (Linux), clock_adjtime(2) (Linux), and ntp_adjtime(3) (FreeBSD).

These kernel APIs are not wrapped by nix or any other maintained crate. Consolidating them into this module contains every unsafe involved in NTP clock discipline to a single audited surface: four functions total. Every call site elsewhere in this crate can then use the wrappers without writing unsafe themselves.

Structs§

Timex
A safe wrapper over libc::timex.

Functions§

adjtimex
Call adjtimex(2) on Linux.
clock_adjtime
Call clock_adjtime(2) on Linux for the given clockid_t.