16 lines
458 B
C++
Executable File
16 lines
458 B
C++
Executable File
#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_;
|
|
};
|