Timeval: Move to osmo_clock_gettime

Change-Id: I24da3e1136c5396062662be1d10b07b4d97cfc2e
changes/81/12281/2
Pau Espin 4 years ago committed by Harald Welte
parent 0646b3ce75
commit 47031405f5
  1. 9
      CommonLibs/Timeval.cpp
  2. 2
      CommonLibs/Timeval.h

@ -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();

@ -47,7 +47,7 @@ class Timeval {
public:
/** Set the value to current time. */
void now() { clock_gettime(CLOCK_REALTIME, &mTimespec); }
void now();
/** Set the value to gettimeofday plus an offset. */
void future(unsigned ms);

Loading…
Cancel
Save