rippled
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
beast::basic_seconds_clock< Clock > Class Template Reference

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

Public Types

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 const bool is_steady = Clock::is_steady
 

Detailed Description

template<class Clock>
class beast::basic_seconds_clock< Clock >

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 147 of file basic_seconds_clock.h.

Member Typedef Documentation

◆ rep

template<class Clock >
using beast::basic_seconds_clock< Clock >::rep = typename Clock::rep

Definition at line 152 of file basic_seconds_clock.h.

◆ period

template<class Clock >
using beast::basic_seconds_clock< Clock >::period = typename Clock::period

Definition at line 153 of file basic_seconds_clock.h.

◆ duration

template<class Clock >
using beast::basic_seconds_clock< Clock >::duration = typename Clock::duration

Definition at line 154 of file basic_seconds_clock.h.

◆ time_point

template<class Clock >
using beast::basic_seconds_clock< Clock >::time_point = typename Clock::time_point

Definition at line 155 of file basic_seconds_clock.h.

Constructor & Destructor Documentation

◆ basic_seconds_clock()

template<class Clock >
beast::basic_seconds_clock< Clock >::basic_seconds_clock ( )
explicitdefault

Member Function Documentation

◆ now()

template<class Clock >
static time_point beast::basic_seconds_clock< Clock >::now ( )
static

Definition at line 160 of file basic_seconds_clock.h.

Member Data Documentation

◆ is_steady

template<class Clock >
const bool beast::basic_seconds_clock< Clock >::is_steady = Clock::is_steady
static

Definition at line 157 of file basic_seconds_clock.h.