rippled
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
beast::basic_seconds_clock Class Reference

A clock whose minimum resolution is one second. More...

#include <basic_seconds_clock.h>

Public Types

using Clock = std::chrono::steady_clock
 
using rep = typename Clock::rep
 
using period = typename Clock::period
 
using duration = typename Clock::duration
 
using time_point = typename Clock::time_point
 

Public Member Functions

 basic_seconds_clock ()=default
 

Static Public Member Functions

static time_point now ()
 

Static Public Attributes

static bool const is_steady = Clock::is_steady
 

Detailed Description

A clock whose minimum resolution is one second.

The purpose of this class is to optimize the performance of the now() member function call. It uses a dedicated thread that wakes up at least once per second to sample the requested trivial clock.

Template Parameters
ClockA type meeting these requirements: http://en.cppreference.com/w/cpp/concept/Clock

Definition at line 17 of file basic_seconds_clock.h.

Member Typedef Documentation

◆ Clock

Definition at line 20 of file basic_seconds_clock.h.

◆ rep

using beast::basic_seconds_clock::rep = typename Clock::rep

Definition at line 24 of file basic_seconds_clock.h.

◆ period

using beast::basic_seconds_clock::period = typename Clock::period

Definition at line 25 of file basic_seconds_clock.h.

◆ duration

using beast::basic_seconds_clock::duration = typename Clock::duration

Definition at line 26 of file basic_seconds_clock.h.

◆ time_point

using beast::basic_seconds_clock::time_point = typename Clock::time_point

Definition at line 27 of file basic_seconds_clock.h.

Constructor & Destructor Documentation

◆ basic_seconds_clock()

beast::basic_seconds_clock::basic_seconds_clock ( )
explicitdefault

Member Function Documentation

◆ now()

basic_seconds_clock::time_point beast::basic_seconds_clock::now ( )
static

Definition at line 83 of file basic_seconds_clock.cpp.

Member Data Documentation

◆ is_steady

bool const beast::basic_seconds_clock::is_steady = Clock::is_steady
static

Definition at line 29 of file basic_seconds_clock.h.