1 2 3 4 5 6 7 8 9 10 11
/* ISC license. */ #include <sys/time.h> #include <skalibs/tai.h> int tain_relative_from_timeval (tain *a, struct timeval const *tv) { tai_relative_from_time(&a->sec, tv->tv_sec) ; a->nano = 1000 * tv->tv_usec ; return 1 ; }