- prefer clock_getttime() over gettimeofday() if available

- use CLOCK_MONOTONIC for POSIX condition in Poco::Event and Poco::Semaphore if supported
This commit is contained in:
Guenter Obiltschnig
2016-08-11 12:45:29 +02:00
parent 8aea55201a
commit dda9d57d1c
4 changed files with 89 additions and 5 deletions

View File

@@ -226,7 +226,7 @@ void Timestamp::update()
ts.QuadPart -= epoch.QuadPart;
_ts = ts.QuadPart/10;
#elif defined(POCO_VXWORKS)
#elif (defined(_POSIX_TIMERS) && defined(CLOCK_REALTIME)) || defined(POCO_VXWORKS) || defined(__QNX__)
struct timespec ts;
if (clock_gettime(CLOCK_REALTIME, &ts))