fix #911 : changed detection macro for clock_gettime()
The new macro might be a bit too restrictive. Systems which do not support new test will simply default to <time.h>'s `clock_t clock()`, suffering lesser benchmark accuracy. Should it matter, the detection macro will have to be upgraded.
This commit is contained in:
parent
896980ec15
commit
e46194bbf9
@ -168,7 +168,7 @@ static int g_utilDisplayLevel;
|
|||||||
}
|
}
|
||||||
return ((clockEnd - clockStart) * (U64)rate.numer) / ((U64)rate.denom);
|
return ((clockEnd - clockStart) * (U64)rate.numer) / ((U64)rate.denom);
|
||||||
}
|
}
|
||||||
#elif (PLATFORM_POSIX_VERSION >= 200112L)
|
#elif defined __UCLIBC__ || ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 17) || __GLIBC__ > 2)
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#define UTIL_TIME_INITIALIZER { 0, 0 }
|
#define UTIL_TIME_INITIALIZER { 0, 0 }
|
||||||
typedef struct timespec UTIL_freq_t;
|
typedef struct timespec UTIL_freq_t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user