skalibs

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

tai_now.c (203B)


      1 /* ISC license. */
      2 
      3 /* MT-unsafe */
      4 
      5 #include <time.h>
      6 #include <skalibs/tai.h>
      7 
      8 int tai_now (tai *t)
      9 {
     10   time_t u = time(0) ;
     11   if (u == (time_t)-1) return 0 ;
     12   return tai_from_time_sysclock(t, u) ;
     13 }