summaryrefslogtreecommitdiff
path: root/src/libstddjb/tai_now.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/tai_now.c')
-rw-r--r--src/libstddjb/tai_now.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstddjb/tai_now.c b/src/libstddjb/tai_now.c
index a1847ab..aaf388a 100644
--- a/src/libstddjb/tai_now.c
+++ b/src/libstddjb/tai_now.c
@@ -3,11 +3,11 @@
/* MT-unsafe */
#include <time.h>
-#include <skalibs/uint64.h>
#include <skalibs/tai.h>
int tai_now (tai_t *t)
{
- register uint64 u = TAI_MAGIC + time(0) ;
- return tai_from_sysclock(t, u) ;
+ register time_t u = time(0) ;
+ if (u == (time_t)-1) return 0 ;
+ return tai_from_time_sysclock(t, u) ;
}