Helper to initialize the global NodeClock, let a duration elapse, and reset it after use in a test.
More...
#include <time.h>
Helper to initialize the global NodeClock, let a duration elapse, and reset it after use in a test.
Definition at line 53 of file time.h.
◆ FakeNodeClock() [1/4]
Initialize with the given time.
Definition at line 59 of file time.h.
◆ FakeNodeClock() [2/4]
| FakeNodeClock::FakeNodeClock |
( |
std::chrono::seconds |
init_time | ) |
|
|
inlineexplicit |
◆ FakeNodeClock() [3/4]
| FakeNodeClock::FakeNodeClock |
( |
| ) |
|
|
inlineexplicit |
Initialize with current time.
Definition at line 62 of file time.h.
◆ ~FakeNodeClock()
| FakeNodeClock::~FakeNodeClock |
( |
| ) |
|
|
inline |
Unset mocktime.
Definition at line 65 of file time.h.
◆ FakeNodeClock() [4/4]
◆ operator+=()
| void FakeNodeClock::operator+= |
( |
std::chrono::seconds |
d | ) |
|
|
inline |
Change mocktime by the given duration delta.
Definition at line 75 of file time.h.
◆ operator-=()
| void FakeNodeClock::operator-= |
( |
std::chrono::seconds |
d | ) |
|
|
inline |
◆ operator=()
◆ set() [1/2]
Set mocktime.
Definition at line 71 of file time.h.
◆ set() [2/2]
| void FakeNodeClock::set |
( |
std::chrono::seconds |
t | ) |
|
|
inline |
◆ m_t
| NodeSeconds FakeNodeClock::m_t {std::chrono::seconds::max()} |
|
private |
The documentation for this class was generated from the following file: