struct timeval
represents and instant in time with two members, tv_sec
(seconds) and tv_usec
(microseconds). In this representation, tv_usec
is not by itself an absolute time it is a sub second offset off of tv_sec
.
struct timespec
works the same way except that instead of microseconds it's offset (tv_nsec
) is stored in nanosecond units.
The question is: Is there a standard way to convert between these two?