summaryrefslogtreecommitdiff
path: root/src/libstddjb/tain_setnow.c
blob: a6ed33709d774d850c8406171c430799832a72e3 (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 const *a)
{
  tain aa ;
  if (!sysclock_from_tai(&aa.sec.x, &a->sec)) return 0 ;
  aa.nano = a->nano ;
  return sysclock_set(&aa) ;
}