SetMockTime

SetMockTime overloads

Synopses

Declared in <util/time.h>

For testing. Set e.g. with the setmocktime rpc, or -mocktime argument.

void
SetMockTime(std::chrono::seconds mock_time_in);
» more...

For testing. Set the mock time from a NodeClock time point.

void
SetMockTime(std::chrono::time_point<NodeClock, std::chrono::seconds> mock);
» more...

Parameters

NameDescription
mock_time_inMock time as a duration in seconds, or zero to disable mocking.
mockMock time point on the NodeClock in seconds.