summaryrefslogtreecommitdiff
path: root/src/libstddjb/utc_from_sysclock.c
blob: 7310a1021acaf550f9c3bb0025f6cda30755ec44 (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
25
/* ISC license. */

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

#ifdef SKALIBS_FLAG_CLOCKISTAI

#include <skalibs/tai.h>

int utc_from_sysclock (uint64_t *u)
{
  tai_t t = { .x = *u + 10U } ;
  return utc_from_tai(u, &t) ;
}

#else

int utc_from_sysclock (uint64_t *u)
{
  (void)u ;
  return 1 ;
}

#endif