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

/* MT-unsafe */

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

int tai_now (tai_t *t)
{
  register uint64 u = TAI_MAGIC + time(0) ;
  return tai_from_sysclock(t, u) ;
}