diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-05-21 19:45:19 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-05-21 19:45:19 +0200 |
commit | 5e0adf9fc426870d46950d606ccbb678a17f423d (patch) | |
tree | 5683b4f1342a6f67778f196e6fd6165fe43fe3a1 /src | |
parent | 8c6dd6fc365fee92e0da15e5e0f5522a27a0bc49 (diff) |
Use platform in semaphore.
Diffstat (limited to 'src')
-rw-r--r-- | src/semaphore.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/semaphore.cc b/src/semaphore.cc index 59a2c54..5bca9af 100644 --- a/src/semaphore.cc +++ b/src/semaphore.cc @@ -41,8 +41,6 @@ #include <sys/time.h> #endif -#endif - struct semaphore_private_t { #if DG_PLATFORM == DG_PLATFORM_WINDOWS HANDLE semaphore; @@ -104,8 +102,8 @@ bool Semaphore::wait(const std::chrono::milliseconds& timeout) int rv = gettimeofday(&now, nullptr); assert(rv == 0); - ts->tv_sec = now.tv_sec; - ts->tv_nsec = now.tv_usec * 1000; + ts.tv_sec = now.tv_sec; + ts.tv_nsec = now.tv_usec * 1000; // Add timeout time_t seconds = (time_t)(timeout.count() / 1000); |