LogCabin
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Types | Static Public Member Functions | Static Public Attributes
LogCabin::Core::Time::MockableClock< _BaseClock > Struct Template Reference

Reads the current time. More...

#include <Time.h>

List of all members.

Classes

struct  Mocker
 RAII class to mock out the clock and then restore it. More...

Public Types

typedef _BaseClock BaseClock
typedef BaseClock::duration duration
typedef BaseClock::rep rep
typedef BaseClock::period period
typedef BaseClock::time_point time_point

Static Public Member Functions

static time_point now ()

Static Public Attributes

static const bool is_steady
static bool useMockValue
static time_point mockValue

Detailed Description

template<typename _BaseClock>
struct LogCabin::Core::Time::MockableClock< _BaseClock >

Reads the current time.

This time may not correspond to wall time, depending on the underlying BaseClock. This class gives unit tests a way to fake the current time.

Definition at line 108 of file Time.h.


Member Typedef Documentation

template<typename _BaseClock >
typedef _BaseClock LogCabin::Core::Time::MockableClock< _BaseClock >::BaseClock

Definition at line 110 of file Time.h.

template<typename _BaseClock >
typedef BaseClock::duration LogCabin::Core::Time::MockableClock< _BaseClock >::duration

Definition at line 111 of file Time.h.

template<typename _BaseClock >
typedef BaseClock::rep LogCabin::Core::Time::MockableClock< _BaseClock >::rep

Definition at line 112 of file Time.h.

template<typename _BaseClock >
typedef BaseClock::period LogCabin::Core::Time::MockableClock< _BaseClock >::period

Definition at line 113 of file Time.h.

template<typename _BaseClock >
typedef BaseClock::time_point LogCabin::Core::Time::MockableClock< _BaseClock >::time_point

Definition at line 114 of file Time.h.


Member Function Documentation

template<typename _BaseClock >
static time_point LogCabin::Core::Time::MockableClock< _BaseClock >::now ( ) [inline, static]

Definition at line 121 of file Time.h.


Member Data Documentation

template<typename _BaseClock >
const bool LogCabin::Core::Time::MockableClock< _BaseClock >::is_steady [static]

Definition at line 119 of file Time.h.

template<typename _BaseClock >
bool LogCabin::Core::Time::MockableClock< BaseClock >::useMockValue [static]

Definition at line 128 of file Time.h.

Definition at line 129 of file Time.h.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines