summaryrefslogtreecommitdiffstats
path: root/vdslib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-10-08 08:13:01 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-10-08 08:15:49 +0000
commit089e0ecd9d91930dbe7d000b57763f5a77e9af9d (patch)
treef8960a04093407193a702cdfd312dd1b9db9da87 /vdslib
parent4291a9ec03e9b5b7c23473725678b3c0785cbf91 (diff)
Use vespalib::Lock -> std::mutex
Diffstat (limited to 'vdslib')
-rw-r--r--vdslib/src/tests/thread/taskschedulertest.cpp11
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;
}
};