Rosetta  2021.07
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
protocols::checkpoint::Timer Class Reference

: singleton checkpoint timer class More...

#include <Checkpoint.hh>

Public Member Functions

void set_interval (const int interval_in)
 

Static Public Member Functions

static Timerinstance (void)
 
static bool is_on (void)
 
static bool time_to_checkpoint (void)
 
static void reset (void)
 

Private Member Functions

 Timer (void)
 

Static Private Attributes

static bool is_on_ = false
 
static int interval_ = 600
 
static time_t time_ = time(nullptr)
 

Detailed Description

: singleton checkpoint timer class

: Keeps track of when to checkpoint using a time interval. Not thread safe.

This doesn't derive from SingletonBase because there's currently no non-static data.

Author
David K

Constructor & Destructor Documentation

protocols::checkpoint::Timer::Timer ( void  )
inlineprivate

References is_on_, and time_.

Member Function Documentation

Timer & protocols::checkpoint::Timer::instance ( void  )
static
bool protocols::checkpoint::Timer::is_on ( void  )
static
void protocols::checkpoint::Timer::reset ( void  )
static
void protocols::checkpoint::Timer::set_interval ( const int  interval_in)
bool protocols::checkpoint::Timer::time_to_checkpoint ( void  )
static

Member Data Documentation

int protocols::checkpoint::Timer::interval_ = 600
staticprivate

Referenced by set_interval(), and time_to_checkpoint().

bool protocols::checkpoint::Timer::is_on_ = false
staticprivate

Referenced by is_on(), and Timer().

time_t protocols::checkpoint::Timer::time_ = time(nullptr)
staticprivate

Referenced by reset(), time_to_checkpoint(), and Timer().


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