From e2188fb9f726cefe0a93e04d5981d6de3a5df341 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 9 Jun 2013 15:43:02 +0000 Subject: [PATCH] Prepared for optional use of clock_gettime() --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/util.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index c048167..0f94adc 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2013.06.09.152602" +#define Cdrskin_timestamP "2013.06.09.154237" diff --git a/libburn/util.c b/libburn/util.c index d4403f0..e1af14f 100644 --- a/libburn/util.c +++ b/libburn/util.c @@ -17,6 +17,7 @@ #include #include #include +#include /* ts A80914 : This is unneeded. Version info comes from libburn.h. @@ -351,13 +352,15 @@ double burn_get_time(int flag) int ret; struct timeval tv; -#ifdef Xorriso_use_clock_gettime_monotoniC +#ifdef Libburn_use_clock_gettime_monotoniC +#ifdef _POSIX_MONOTONIC_CLOCK struct timespec tp; - ret = clock_gettime(CLOCK_MONOTONIC, &tp) + ret = clock_gettime(CLOCK_MONOTONIC, &tp); if (ret == 0) return ((double) tp.tv_sec) + ((double) tp.tv_nsec) * 1.0e-9; +#endif /* _POSIX_MONOTONIC_CLOCK */ #endif /* Xorriso_use_clock_gettime_monotoniC */ ret = gettimeofday(&tv, NULL);