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

/* MT-unsafe */

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

int tai_now (tai *t)
{
  time_t u = time(0) ;
  if (u == (time_t)-1) return 0 ;
  return tai_from_time_sysclock(t, u) ;
}