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