Commit e2188fb9 authored by Thomas Schmitt's avatar Thomas Schmitt

Prepared for optional use of clock_gettime()

parent fd8f4d48
#define Cdrskin_timestamP "2013.06.09.152602"
#define Cdrskin_timestamP "2013.06.09.154237"
......@@ -17,6 +17,7 @@
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
/* 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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment