We have POSIX clocks.

We're probably not running the RIL on a Mac.

Change-Id: Ib6be56cd26d67e2b72b559cb364b1e34ab613016
tirimbino
Elliott Hughes 10 years ago committed by Ethan Chen
parent d126ce64b4
commit 4c4ae39dec
  1. 4
      ril/libril/ril_event.cpp

@ -95,14 +95,10 @@ static void dump_event(struct ril_event * ev)
static void getNow(struct timeval * tv) static void getNow(struct timeval * tv)
{ {
#ifdef HAVE_POSIX_CLOCKS
struct timespec ts; struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts); clock_gettime(CLOCK_MONOTONIC, &ts);
tv->tv_sec = ts.tv_sec; tv->tv_sec = ts.tv_sec;
tv->tv_usec = ts.tv_nsec/1000; tv->tv_usec = ts.tv_nsec/1000;
#else
gettimeofday(tv, NULL);
#endif
} }
static void init_list(struct ril_event * list) static void init_list(struct ril_event * list)

Loading…
Cancel
Save