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

/* MT-unsafe */

#include <skalibs/tai.h>

int tain_setnow (tain_t const *a)
{
  tain_t aa ;
  if (!sysclock_from_tai(&aa.sec.x, &a->sec)) return 0 ;
  aa.nano = a->nano ;
  return sysclock_set(&aa) ;
}