[#MockableSteadyClock]
= MockableSteadyClock
:mrdocs:

Version of SteadyClock that is mockable in the context of tests (via FakeSteadyClock, or Self&colon;&colon;SetMockTime), otherwise the system steady clock&period;

== Synopsis

Declared in `&lt;util&sol;time&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct MockableSteadyClock
    : std::chrono::steady&lowbar;clock
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `std::chrono::steady&lowbar;clock`
| 
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:MockableSteadyClock/duration.adoc[`duration`] 
| 
| xref:MockableSteadyClock/mock_time_point.adoc[`mock&lowbar;time&lowbar;point`] 
| Time point type used to store the mocked time, in milliseconds&period;
| xref:MockableSteadyClock/period.adoc[`period`] 
| 
| xref:MockableSteadyClock/rep.adoc[`rep`] 
| 
| xref:MockableSteadyClock/time_point.adoc[`time&lowbar;point`] 
| Time point measured against this clock&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:MockableSteadyClock/ClearMockTime.adoc[`ClearMockTime`] 
| Clear mock time, go back to system steady clock&period;
| xref:MockableSteadyClock/SetMockTime.adoc[`SetMockTime`] 
| Set mock time for testing&period; When mocking the steady clock, start at INITIAL&lowbar;MOCK&lowbar;TIME and add durations to elapse time as necessary for testing&period; To stop mocking, call ClearMockTime()&period;
| xref:MockableSteadyClock/from_time_t.adoc[`from&lowbar;time&lowbar;t`]  [.small]#[deleted]#
| Deleted and unused conversion from std&colon;&colon;time&lowbar;t&period;
| xref:MockableSteadyClock/now.adoc[`now`] 
| Return current system time or mocked time, if set&period;
| xref:MockableSteadyClock/to_time_t.adoc[`to&lowbar;time&lowbar;t`]  [.small]#[deleted]#
| Deleted and unused conversion to std&colon;&colon;time&lowbar;t&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:MockableSteadyClock/INITIAL_MOCK_TIME.adoc[`INITIAL&lowbar;MOCK&lowbar;TIME`] 
| Starting value used when mocking begins&period;
| xref:MockableSteadyClock/is_steady.adoc[`is&lowbar;steady`] 
| 
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
