timeradd(3) Library Functions Manual timeradd(3) timeradd, timersub, timercmp, timerclear, timerisset - timeval C (libc, -lc) #include void timeradd(struct timeval *a, struct timeval *b, struct timeval *res); void timersub(struct timeval *a, struct timeval *b, struct timeval *res); void timerclear(struct timeval *tvp); int timerisset(struct timeval *tvp); int timercmp(struct timeval *a, struct timeval *b, CMP); glibc (. feature_test_macros(7)): , : glibc 2.19: _DEFAULT_SOURCE glibc 2.19 : _BSD_SOURCE timeval, : struct timeval { time_t tv_sec; /* */ suseconds_t tv_usec; /* */ }; timeradd() a b, timeval, res. , res->tv_usec 0 999999. timersub() b a, timeval, res. , res->tv_usec 0 999999. timerclear() timeval, tvp; : 1970-01-01 00:00:00 +0000 (UTC). timerisset() ( ), timeval, tvp, . timercmp() a b CMP, ( ) (0), . ( Linux/glibc) timercmp(), CMP >=, <= == ; !timercmp(..., <) !timercmp(..., >) !timercmp(..., !=) timerisset() timercmp() ( ) (0). . None. BSD. gettimeofday(2), time(7) () Azamat Hackimov , Dmitry Bolkhovskikh , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . timeradd(3)