Version of SteadyClock that is mockable in the context of tests (via FakeSteadyClock, or Self::SetMockTime), otherwise the system steady clock.
Declared in <util/time.h>
struct MockableSteadyClock
: std::chrono::steady_clock
| Name | Description |
|---|---|
std::chrono::steady_clock |
| Name | Description |
|---|---|
duration | |
mock_time_point | Time point type used to store the mocked time, in milliseconds. |
period | |
rep | |
time_point | Time point measured against this clock. |
| Name | Description |
|---|---|
ClearMockTime | Clear mock time, go back to system steady clock. |
SetMockTime | Set mock time for testing. When mocking the steady clock, start at INITIAL_MOCK_TIME and add durations to elapse time as necessary for testing. To stop mocking, call ClearMockTime(). |
from_time_t [deleted] | Deleted and unused conversion from std::time_t. |
now | Return current system time or mocked time, if set. |
to_time_t [deleted] | Deleted and unused conversion to std::time_t. |
| Name | Description |
|---|---|
INITIAL_MOCK_TIME | Starting value used when mocking begins. |
is_steady |