summaryrefslogtreecommitdiff
path: root/src/libstddjb/sysclock_from_localtmn.c
blob: 7b227d292713e5b775c84bc04954bbf918f174fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <skalibs/tai.h>
#include <skalibs/djbtime.h>

int sysclock_from_localtmn (tain_t *a, localtmn_t const *l)
{
  uint64 u ;
  if (!sysclock_from_localtm(&u, &l->tm)) return 0 ;
  tai_u64(&a->sec, u) ;
  a->nano = l->nano ;
  return 1 ;
}