diff options
-rw-r--r-- | tools/time_ms.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/time_ms.h b/tools/time_ms.h index f49458bb..1bbd129f 100644 --- a/tools/time_ms.h +++ b/tools/time_ms.h @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: time_ms.h,v 1.1 2012-02-17 09:15:42 phintuka Exp $ + * $Id: time_ms.h,v 1.2 2012-03-20 09:10:33 phintuka Exp $ * */ @@ -16,7 +16,11 @@ static uint64_t time_ms(void) { struct timeval t; +#ifdef XINEUTILS_H + if (xine_monotonic_clock(&t, NULL) == 0) +#else if (gettimeofday(&t, NULL) == 0) +#endif return ((uint64_t)t.tv_sec) * 1000ULL + t.tv_usec / 1000ULL; return 0; } |