summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--raul/Semaphore.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/raul/Semaphore.hpp b/raul/Semaphore.hpp
index 1c6ee71..0eb1703 100644
--- a/raul/Semaphore.hpp
+++ b/raul/Semaphore.hpp
@@ -256,7 +256,8 @@ Semaphore::timed_wait(const std::chrono::duration<Rep, Period>& wait)
const chr::seconds end_sec(chr::duration_cast<chr::seconds>(end));
const chr::nanoseconds end_nsec(end - end_sec);
- const struct timespec ts_end = { end_sec.count(), end_nsec.count() };
+ const struct timespec ts_end = { static_cast<time_t>(end_sec.count()),
+ static_cast<long>(end_nsec.count()) };
return (sem_timedwait(&_sem, &ts_end) == 0);
}