summaryrefslogtreecommitdiff
path: root/src/libstddjb/tai_from_timeval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/tai_from_timeval.c')
-rw-r--r--src/libstddjb/tai_from_timeval.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstddjb/tai_from_timeval.c b/src/libstddjb/tai_from_timeval.c
new file mode 100644
index 0000000..41cf5a1
--- /dev/null
+++ b/src/libstddjb/tai_from_timeval.c
@@ -0,0 +1,10 @@
+/* ISC license. */
+
+#include <sys/time.h>
+#include <skalibs/tai.h>
+
+int tai_from_timeval (tai_t *t, struct timeval const *tv)
+{
+ tai_unix(t, tv->tv_sec) ;
+ return 1 ;
+}