Version of SteadyClock that is mockable in the context of tests (via FakeSteadyClock, or Self::SetMockTime), otherwise the system steady clock.
Synopsis
Declared in <util/time.h>
struct MockableSteadyClock
: std::chrono::steady_clock
Base Classes
Name |
Description |
|
Type Aliases
Name |
Description |
Time point type used to store the mocked time, in milliseconds. |
|
Time point measured against this clock. |
Static Member Functions
Name |
Description |
Clear mock time, go back to system steady clock. |
|
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(). |
|
|
Deleted and unused conversion from std::time_t. |
Return current system time or mocked time, if set. |
|
|
Deleted and unused conversion to std::time_t. |
Static Data Members
Name |
Description |
Starting value used when mocking begins. |
|
Created with MrDocs