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(NodeSeconds t)
Set mocktime.
void operator+=(std::chrono::seconds d)
Change mocktime by the given duration delta.
FakeNodeClock & operator=(const FakeNodeClock &)=delete
FakeNodeClock(NodeSeconds init_time)
Initialize with the given time.
FakeNodeClock(const FakeNodeClock &)=delete
void operator-=(std::chrono::seconds d)
void set(std::chrono::seconds t)
FakeNodeClock()
Initialize with current time.
~FakeNodeClock()
Unset mocktime.
FakeNodeClock(std::chrono::seconds init_time)
Helper to initialize the global MockableSteadyClock, let a duration elapse, and reset it after use in...
FakeSteadyClock & operator=(const FakeSteadyClock &)=delete
void operator+=(std::chrono::milliseconds d)
Change mocktime by the given duration delta.
FakeSteadyClock()
Initialize with INITIAL_MOCK_TIME.
FakeSteadyClock(const FakeSteadyClock &)=delete
MockableSteadyClock::mock_time_point::duration t
~FakeSteadyClock()
Unset mocktime.
CRTP Helper to limit a class to at most one at a time.
static bool g_T_available
LimitOne & operator=(const LimitOne &)=delete
LimitOne(const LimitOne &)=delete
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