int gettimeofday(struct timeval *restrict tv, struct timezone *restrict tz);
int clock_gettime(clockid_t clockid, struct timespec *tp);
int timespec_get(struct timespec *ts, int base);
base: TIME_UTC
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};