Bitcoin ABC 0.30.5
P2P Digital Currency
Public Types | Static Public Member Functions | List of all members
NodeClock Struct Reference

Mockable clock in the context of tests, otherwise the system clock. More...

#include <time.h>

Inheritance diagram for NodeClock:
[legend]
Collaboration diagram for NodeClock:
[legend]

Public Types

using time_point = std::chrono::time_point< NodeClock >
 

Static Public Member Functions

static time_point now () noexcept
 Return current system time or mocked time, if set. More...
 
static std::time_t to_time_t (const time_point &)=delete
 
static time_point from_time_t (std::time_t)=delete
 

Detailed Description

Mockable clock in the context of tests, otherwise the system clock.

Definition at line 18 of file time.h.

Member Typedef Documentation

◆ time_point

using NodeClock::time_point = std::chrono::time_point<NodeClock>

Definition at line 19 of file time.h.

Member Function Documentation

◆ from_time_t()

static time_point NodeClock::from_time_t ( std::time_t  )
staticdelete

◆ now()

NodeClock::time_point NodeClock::now ( )
staticnoexcept

Return current system time or mocked time, if set.

Definition at line 71 of file time.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_time_t()

static std::time_t NodeClock::to_time_t ( const time_point )
staticdelete

The documentation for this struct was generated from the following files: