additional cleanup after switch from .beagle to .recollweb

This commit is contained in:
Jean-Francois Dockes
2012-12-14 13:20:09 +01:00
parent e24bd240f9
commit 72927b3fc8
7 changed files with 28 additions and 11 deletions
+11 -1
View File
@@ -666,6 +666,7 @@ struct m_timespec {
#endif
#ifndef CLOCK_REALTIME
typedef int clockid_t;
#define CLOCK_REALTIME 1
#endif
@@ -675,10 +676,19 @@ struct m_timespec {
((TV).tv_nsec - m_nsecs) / 1000))
#define NANOS(TV) ( (long long)(((TV).tv_sec - m_secs) * 1000000000LL + \
((TV).tv_nsec - m_nsecs)))
#ifdef __APPLE__
#include <sys/time.h>
#endif
static void gettime(clockid_t clk_id, struct timespec *ts)
{
#ifdef __APPLE__
struct timeval tv;
gettimeofday(&tv, 0);
ts->tv_sec = tv.tv_sec;
ts->tv_nsec = tv.tv_usec * 1000;
#else
clock_gettime(clk_id, ts);
#endif
}
///// End system interface