aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs/Timeval.cpp
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-12-12 17:06:06 +0100
committerHarald Welte <laforge@gnumonks.org>2018-12-13 13:58:24 +0000
commit47031405f55d8c58b964a8c8b79aa169d309eb63 (patch)
tree07dd7ba4b586a89a4729e4ba8ef87d320fcd6744 /CommonLibs/Timeval.cpp
parent0646b3ce751bc485a466cda1580eaee786bead87 (diff)
Timeval: Move to osmo_clock_gettime
Diffstat (limited to 'CommonLibs/Timeval.cpp')
-rw-r--r--CommonLibs/Timeval.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/CommonLibs/Timeval.cpp b/CommonLibs/Timeval.cpp
index 21072fc..fd1bcda 100644
--- a/CommonLibs/Timeval.cpp
+++ b/CommonLibs/Timeval.cpp
@@ -27,8 +27,17 @@
#include "Timeval.h"
+extern "C" {
+#include <osmocom/core/timer.h>
+}
+
using namespace std;
+void Timeval::now()
+{
+ osmo_clock_gettime(CLOCK_REALTIME, &mTimespec);
+}
+
void Timeval::future(unsigned offset)
{
now();