diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-05-21 19:44:44 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-05-21 19:44:44 +0200 |
commit | 8c6dd6fc365fee92e0da15e5e0f5522a27a0bc49 (patch) | |
tree | 4d9c69d79f627e8a74cc01ca7a4b5fc7eebc3bc2 /src | |
parent | ea1ef4ab8f2c3ba51a574029e8b475d40c9fb9c6 (diff) |
Use platform in semaphore.
Diffstat (limited to 'src')
-rw-r--r-- | src/semaphore.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/semaphore.cc b/src/semaphore.cc index e872ff2..59a2c54 100644 --- a/src/semaphore.cc +++ b/src/semaphore.cc @@ -38,7 +38,7 @@ #include <../include/semaphore.h> #include <errno.h> #include <stdio.h> -#include <time.h> +#include <sys/time.h> #endif #endif @@ -81,7 +81,7 @@ Semaphore::~Semaphore() void Semaphore::post() { #if DG_PLATFORM == DG_PLATFORM_WINDOWS - ReleaseSemaphore(prv->semaphore, 1, NULL); + ReleaseSemaphore(prv->semaphore, 1, nullptr); #else sem_post(&prv->semaphore); #endif @@ -101,7 +101,7 @@ bool Semaphore::wait(const std::chrono::milliseconds& timeout) struct timespec ts; struct timeval now; - int rv = gettimeofday(&now, NULL); + int rv = gettimeofday(&now, nullptr); assert(rv == 0); ts->tv_sec = now.tv_sec; |