timeradd - Online Linux Manual PageSection : 3
Updated : 2023-02-05
Source : Linux man-pages 6.03

NAMEtimeradd, timersub, timercmp, timerclear, timerisset − timeval operations

LIBRARYStandard C library (libc, −lc)

SYNOPSIS#include <sys/time.h>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);Feature Test Macro Requirements for glibc (see feature_test_macros(7)): All functions shown above: Since glibc 2.19: _DEFAULT_SOURCE glibc 2.19 and earlier: _BSD_SOURCE

DESCRIPTIONThe macros are provided to operate on timeval structures, defined in <sys/time.h> as: struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec; /* microseconds */ };timeradd() adds the time values in a and b, and places the sum in the timeval pointed to by res. The result is normalized such that res−>tv_usec has a value in the range 0 to 999,999. timersub() subtracts the time value in b from the time value in a, and places the result in the timeval pointed to by res. The result is normalized such that res−>tv_usec has a value in the range 0 to 999,999. timerclear() zeros out the timeval structure pointed to by tvp, so that it represents the Epoch: 1970-01-01 00:00:00 +0000 (UTC). timerisset() returns true (nonzero) if either field of the timeval structure pointed to by tvp contains a nonzero value. timercmp() compares the timer values in a and b using the comparison operator CMP, and returns true (nonzero) or false (0) depending on the result of the comparison. Some systems (but not Linux/glibc), have a broken timercmp() implementation, in which CMP of >=, <=, and == do not work; portable applications can instead use !timercmp(..., <) !timercmp(..., >) !timercmp(..., !=)

RETURN VALUEtimerisset() and timercmp() return true (nonzero) or false (0).

ERRORSNo errors are defined.

STANDARDSNot in POSIX.1. Present on most BSD derivatives.

SEE ALSOgettimeofday(2), time(7)
0
Johanes Gumabo
Data Size   :   10,145 byte
man-timersub.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 239,091
Visitor ID   :     :  
Visitor IP   :   3.145.78.12   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.