summaryrefslogtreecommitdiff
path: root/src/libstddjb/ltm64_from_sysclock.c
blob: 54aca39e8a18f40d86df107bc594dd6ba87a0fee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ISC license. */

#include <skalibs/config.h>
#include <skalibs/uint64.h>
#include <skalibs/djbtime.h>

#ifdef SKALIBS_FLAG_CLOCKISTAI

#include <skalibs/tai.h>

int ltm64_from_sysclock (uint64 *u)
{
  tai_t t = { *u + 10U } ;
  return ltm64_from_tai(u, &t) ;
}

#else

int ltm64_from_sysclock (uint64 *u)
{
  return ltm64_from_utc(u) ;
}

#endif