summaryrefslogtreecommitdiff
path: root/src/libstddjb/tain_relative_from_timespec.c
blob: 5f492ff725270438d66aece178efc25b48679355 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* ISC license. */

#include <time.h>
#include <skalibs/tai.h>

int tain_relative_from_timespec (tain_t *a, struct timespec const *ts)
{
  tai_relative_from_time(&a->sec, ts->tv_sec) ;
  a->nano = ts->tv_nsec ;
  return 1 ;
}