summaryrefslogtreecommitdiff
path: root/src/libstddjb/tain_relative_from_timeval.c
blob: eafb57a44288f25a0939b03247b6f9c7f65011d5 (plain)
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_t *a, struct timeval const *tv)
{
  tai_relative_from_time(&a->sec, tv->tv_sec) ;
  a->nano = 1000 * tv->tv_usec ;
  return 1 ;
}