rippled
Loading...
Searching...
No Matches
ManualTimeKeeper.h
1#ifndef XRPL_TEST_MANUALTIMEKEEPER_H_INCLUDED
2#define XRPL_TEST_MANUALTIMEKEEPER_H_INCLUDED
3
4#include <xrpld/core/TimeKeeper.h>
5
6#include <atomic>
7
8namespace ripple {
9namespace test {
10
12{
13private:
15
16public:
17 ManualTimeKeeper() = default;
18
20 now() const override
21 {
22 return now_.load();
23 }
24
25 void
27 {
28 now_.store(now);
29 }
30};
31
32} // namespace test
33} // namespace ripple
34
35#endif
Manages various times used by the server.
Definition TimeKeeper.h:13
std::atomic< time_point > now_
time_point now() const override
Returns the current time.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6