aboutsummaryrefslogtreecommitdiff
path: root/src/common/thread.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-08 12:48:57 -0400
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-18 16:29:17 -0400
commit0f8e5a146563d1f245f8f62cb931dc1e0b55de2f (patch)
tree1145873a1269aca9e259ceb0b14ce946f6f3cbfd /src/common/thread.h
parent62e35ffc0effddfacb73ebc766735148436d7331 (diff)
Tests: Add base tests to host timing
Diffstat (limited to 'src/common/thread.h')
-rw-r--r--src/common/thread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/thread.h b/src/common/thread.h
index 2fc0716855..127cc7e233 100644
--- a/src/common/thread.h
+++ b/src/common/thread.h
@@ -9,6 +9,7 @@
#include <cstddef>
#include <mutex>
#include <thread>
+#include "common/common_types.h"
namespace Common {
@@ -28,8 +29,7 @@ public:
is_set = false;
}
- template <class Duration>
- bool WaitFor(const std::chrono::duration<Duration>& time) {
+ bool WaitFor(const std::chrono::nanoseconds& time) {
std::unique_lock lk{mutex};
if (!condvar.wait_for(lk, time, [this] { return is_set; }))
return false;