diff --git a/events_posix.c b/events_posix.c index a7340bc..453fdb5 100644 --- a/events_posix.c +++ b/events_posix.c @@ -11,28 +11,16 @@ #include "events_mutex.h" #include +#include // Tick operations -#ifdef _POSIX_TIMERS - -unsigned events_tick(void) { - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - return (unsigned)(ts.tv_sec*1000 + ts.tv_nsec/1000000); -} - -#else -#include - unsigned events_tick(void) { struct timeval tv; gettimeofday(&tv, 0); return (unsigned)(tv.tv_sec*1000 + tv.tv_usec/1000); } -#endif - // Mutex operations int events_mutex_create(events_mutex_t *m) {