Five macros for manipulating time values are defined in <sys/time.h>:
timerclear(struct timeval *)
Sets a time value to zero.
timerisset(struct timeval *)
Tests if a time value is non-zero.
timercmp(struct timeval *a, struct timeval *b, CMP)
Compares two time values in the form a CMP b, where CMP is <, =, or
> (beware that >= and <= do not work with this macro).
timersub(struct timeval *a, struct timeval *b, struct timeval *res)
Subtracts a - b and stores the result in res.
timeradd(struct timeval *a, struct timeval *a, struct timeval *res)
Adds two timers and stores the result in res.
[quote] Five macros for manipulating
매크로 이군요..
sys/time.h
보시면 확실히 아실듯.~~^^
댓글 달기