skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

ltm64_from_sysclock.c (328B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/config.h>
      4 #include <skalibs/djbtime.h>
      5 
      6 #ifdef SKALIBS_FLAG_CLOCKISTAI
      7 
      8 #include <skalibs/tai.h>
      9 
     10 int ltm64_from_sysclock (uint64_t *u)
     11 {
     12   tai t = { .x = *u + 10U } ;
     13   return ltm64_from_tai(u, &t) ;
     14 }
     15 
     16 #else
     17 
     18 int ltm64_from_sysclock (uint64_t *u)
     19 {
     20   return ltm64_from_utc(u) ;
     21 }
     22 
     23 #endif