adjtime(3) Library Functions Manual adjtime(3) adjtime - LIBRARY Standard C library (libc, -lc) #include int adjtime(const struct timeval *delta, struct timeval *olddelta); glibc (. feature_test_macros(7)): adjtime(): glibc 2.19: _DEFAULT_SOURCE glibc 2.19 : _BSD_SOURCE adjtime() ( gettimeofday(2)). , , , delta. : struct timeval { time_t tv_sec; /* */ suseconds_t tv_usec; /* */ }; delta , ( ) , . delta , . adjtime() adjtime(), delta NULL, , . olddelta NULL, , , . adjtime() 0. -1, errno . EINVAL delta . EPERM . Linux CAP_SYS_TIME. attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |adjtime() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ None. 4.3BSD, System V. The adjustment that adjtime() makes to the clock is carried out in such a manner that the clock is always monotonically increasing. Using adjtime() to adjust the time prevents the problems that could be caused for certain applications (e.g., make(1)) by abrupt positive or negative jumps in the system time. adjtime() . , delta. glibc delta (INT_MAX / 1000000 - 2) (INT_MIN / 1000000 + 2) ( i386 -2145 2145 , ). , delta NULL, olddelta ( adjtime() ). glibc 2.8 Linux 2.6.26 . . adjtimex(2), gettimeofday(2), time(7) Dmitry Bolkhovskikh Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 28 2024 . adjtime(3)