skalibs

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

timespec_from_tain.c (222B)


      1 /* ISC license. */
      2 
      3 #include <time.h>
      4 #include <skalibs/tai.h>
      5 
      6 int timespec_from_tain (struct timespec *ts, tain const *t)
      7 {
      8   if (!time_from_tai(&ts->tv_sec, &t->sec)) return 0 ;
      9   ts->tv_nsec = t->nano ;
     10   return 1 ;
     11 }