diff options
Diffstat (limited to 'vdslib/src')
-rw-r--r-- | vdslib/src/tests/thread/taskschedulertest.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/vdslib/src/tests/thread/taskschedulertest.cpp b/vdslib/src/tests/thread/taskschedulertest.cpp index 1925625172c..54877fae62b 100644 --- a/vdslib/src/tests/thread/taskschedulertest.cpp +++ b/vdslib/src/tests/thread/taskschedulertest.cpp @@ -2,7 +2,6 @@ #include <vespa/vdslib/thread/taskscheduler.h> #include <vespa/vespalib/gtest/gtest.h> -#include <vespa/vespalib/util/time.h> #include <thread> namespace vdslib { @@ -10,24 +9,24 @@ namespace vdslib { namespace { struct TestWatch : public TaskScheduler::Watch { - vespalib::Lock _lock; + mutable std::mutex _lock; uint64_t _time; TestWatch(uint64_t startTime = 0) : _time(startTime) {} - ~TestWatch() {} + ~TestWatch() = default; TaskScheduler::Time getTime() const override { - vespalib::LockGuard guard(_lock); + std::lock_guard guard(_lock); return _time; } void increment(uint64_t ms) { - vespalib::LockGuard guard(_lock); + std::lock_guard guard(_lock); _time += ms; } void set(uint64_t ms) { - vespalib::LockGuard guard(_lock); + std::lock_guard guard(_lock); _time = ms; } }; |