blob: f08ad71fb3eaa21b146b41b65596fbefb489b135 (
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 <errno.h>
#include <skalibs/config.h>
#include <skalibs/tai.h>
#ifdef SKALIBS_FLAG_CLOCKISTAI
int sysclock_from_tai (uint64_t *u, tai const *t)
{
if (t->x < 10U) return (errno = EINVAL, 0) ;
*u = t->x - 10U ;
return 1 ;
}
#else
#include <skalibs/djbtime.h>
int sysclock_from_tai (uint64_t *u, tai const *t)
{
return utc_from_tai(u, t) ;
}
#endif
|