Fist commit
This commit is contained in:
15
test/test_native_scheduler/FakeMonotonicClock.h
Executable file
15
test/test_native_scheduler/FakeMonotonicClock.h
Executable file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "SessionClock.h"
|
||||
|
||||
class FakeMonotonicClock final : public timbre_core::MonotonicClock {
|
||||
public:
|
||||
explicit FakeMonotonicClock(std::uint64_t initial = 0) : value_(initial) {}
|
||||
|
||||
std::uint64_t nowMs() const override { return value_; }
|
||||
void advance(std::uint64_t milliseconds) noexcept { value_ += milliseconds; }
|
||||
void set(std::uint64_t milliseconds) noexcept { value_ = milliseconds; }
|
||||
|
||||
private:
|
||||
std::uint64_t value_;
|
||||
};
|
||||
Reference in New Issue
Block a user