[#SetMockTime-03]
= SetMockTime
:mrdocs:

`SetMockTime` overloads

== Synopses

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

For testing&period; Set e&period;g&period; with the setmocktime rpc, or &hyphen;mocktime argument&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:SetMockTime-0e5.adoc[SetMockTime](std::chrono::seconds mock&lowbar;time&lowbar;in);
----

[.small]#xref:SetMockTime-0e5.adoc[_» more&period;&period;&period;_]#

For testing&period; Set the mock time from a NodeClock time point&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:SetMockTime-0ef.adoc[SetMockTime](std::chrono::time&lowbar;point&lt;NodeClock, std::chrono::seconds&gt; mock);
----

[.small]#xref:SetMockTime-0ef.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *mock&lowbar;time&lowbar;in*
| Mock time as a duration in seconds, or zero to disable mocking&period;
| *mock*
| Mock time point on the NodeClock in seconds&period;
|===


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