Usage long intfor these variables will work until the year 2038 , after which it tv_secwill overflow on machines where it longis 4 bytes.
timeval is defined as:
The <sys/time.h> header shall define the timeval structure that includes at least the following members:
time_t tv_sec Seconds.
suseconds_t tv_usec Microseconds.
, long time_t, 32- , 64- . , time_t, , 32- 64-.
unsigned long, 2100+ . time_t, , .