summaryrefslogtreecommitdiff
path: root/accel-pppd/triton
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/triton')
-rw-r--r--accel-pppd/triton/log.c1
-rw-r--r--accel-pppd/triton/triton.h8
2 files changed, 8 insertions, 1 deletions
diff --git a/accel-pppd/triton/log.c b/accel-pppd/triton/log.c
index 9226e117..668d9e92 100644
--- a/accel-pppd/triton/log.c
+++ b/accel-pppd/triton/log.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdarg.h>
+#include <sys/time.h>
#include "triton_p.h"
diff --git a/accel-pppd/triton/triton.h b/accel-pppd/triton/triton.h
index af42a19d..3c02db2e 100644
--- a/accel-pppd/triton/triton.h
+++ b/accel-pppd/triton/triton.h
@@ -1,7 +1,7 @@
#ifndef TRITON_H
#define TRITON_H
-#include <sys/time.h>
+#include <time.h>
#include <stdint.h>
#include "list.h"
@@ -110,6 +110,12 @@ int triton_module_loaded(const char *name);
void triton_register_init(int order, void (*func)(void));
+static inline time_t _time()
+{
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ return ts.tv_sec;
+}
#define TRITON_OK 0
#define TRITON_ERR_NOCOMP -1