summaryrefslogtreecommitdiff
path: root/src/libstddjb/tain_relative_from_timespec.c
blob: 394785b747d9dff351a04643a1a663d27910a647 (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 *a, struct timespec const *ts)
{
  tai_relative_from_time(&a->sec, ts->tv_sec) ;
  a->nano = ts->tv_nsec ;
  return 1 ;
}