time: Add converters from struct {timespec|timeval}

Instead of open-coding conversion from struct timespec and struct
timeval to uint64_t (usec) representation, add a couple of convenience
functions.
1 file changed