fix clock_gettime detection
fixes compilation with mingw64 gcc-4.9.1
This commit is contained in:
parent
0d20cd5911
commit
8fe3360c35
@ -118,7 +118,7 @@ FileManager::allocate (FileDescriptor* d)
|
||||
|
||||
#ifdef __APPLE__
|
||||
d->_last_used = mach_absolute_time();
|
||||
#elif defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK)
|
||||
#elif defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_C_SOURCE >= 199309L)
|
||||
struct timespec t;
|
||||
clock_gettime (CLOCK_MONOTONIC, &t);
|
||||
d->_last_used = t.tv_sec + (double) t.tv_nsec / 10e9;
|
||||
|
Loading…
Reference in New Issue
Block a user