From 9994d48250e3805565f709d39ea0de4877436c6c Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Fri, 3 Oct 2014 21:59:07 +0400 Subject: get rid of time(), use clock_gettime(CLOCK_MONOTONIC) instead --- accel-pppd/triton/log.c | 1 + accel-pppd/triton/triton.h | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'accel-pppd/triton') diff --git a/accel-pppd/triton/log.c b/accel-pppd/triton/log.c index 9226e11..668d9e9 100644 --- a/accel-pppd/triton/log.c +++ b/accel-pppd/triton/log.c @@ -1,5 +1,6 @@ #include #include +#include #include "triton_p.h" diff --git a/accel-pppd/triton/triton.h b/accel-pppd/triton/triton.h index af42a19..3c02db2 100644 --- a/accel-pppd/triton/triton.h +++ b/accel-pppd/triton/triton.h @@ -1,7 +1,7 @@ #ifndef TRITON_H #define TRITON_H -#include +#include #include #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 -- cgit v1.2.3