[#MockableSteadyClock] = MockableSteadyClock :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct MockableSteadyClock : std::chrono::steady_clock ---- == Base Classes [cols="1,4"] |=== | Name| Description | `std::chrono::steady_clock` | |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:MockableSteadyClock/duration.adoc[`duration`] | | xref:MockableSteadyClock/mock_time_point.adoc[`mock_time_point`] | Time point type used to store the mocked time, in milliseconds. | xref:MockableSteadyClock/period.adoc[`period`] | | xref:MockableSteadyClock/rep.adoc[`rep`] | | xref:MockableSteadyClock/time_point.adoc[`time_point`] | Time point measured against this clock. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:MockableSteadyClock/ClearMockTime.adoc[`ClearMockTime`] | Clear mock time, go back to system steady clock. | xref:MockableSteadyClock/SetMockTime.adoc[`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(). | xref:MockableSteadyClock/from_time_t.adoc[`from_time_t`] [.small]#[deleted]# | Deleted and unused conversion from std::time_t. | xref:MockableSteadyClock/now.adoc[`now`] | Return current system time or mocked time, if set. | xref:MockableSteadyClock/to_time_t.adoc[`to_time_t`] [.small]#[deleted]# | Deleted and unused conversion to std::time_t. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:MockableSteadyClock/INITIAL_MOCK_TIME.adoc[`INITIAL_MOCK_TIME`] | Starting value used when mocking begins. | xref:MockableSteadyClock/is_steady.adoc[`is_steady`] | |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#