summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/semaphore.cc6
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;