5#ifndef BITCOIN_TEST_UTIL_TIME_H
6#define BITCOIN_TEST_UTIL_TIME_H
#define Assert(val)
Identity function.
Helper to initialize the global NodeClock, let a duration elapse, and reset it after use in a test.
void set(std::chrono::seconds t)
void operator+=(std::chrono::seconds d)
Change mocktime by the given duration delta.
NodeClockContext & operator=(const NodeClockContext &)=delete
NodeClockContext()
Initialize with current time, using the next tick to avoid going back by rounding to seconds.
void set(NodeSeconds t)
Set mocktime.
void operator-=(std::chrono::seconds d)
NodeClockContext(std::chrono::seconds init_time)
NodeClockContext(const NodeClockContext &)=delete
~NodeClockContext()
Unset mocktime.
NodeClockContext(NodeSeconds init_time)
Initialize with the given time.
Helper to initialize the global MockableSteadyClock, let a duration elapse, and reset it after use in...
~SteadyClockContext()
Unset mocktime.
MockableSteadyClock::mock_time_point::duration t
SteadyClockContext & operator=(const SteadyClockContext &)=delete
void operator+=(std::chrono::milliseconds d)
Change mocktime by the given duration delta.
SteadyClockContext(const SteadyClockContext &)=delete
SteadyClockContext()
Initialize with INITIAL_MOCK_TIME.
static void SetMockTime(mock_time_point::duration mock_time_in)
Set mock time for testing.
static constexpr mock_time_point::duration INITIAL_MOCK_TIME
static void ClearMockTime()
Clear mock time, go back to system steady clock.
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.
std::chrono::time_point< NodeClock, std::chrono::seconds > NodeSeconds