35 #ifndef _BLAZE_UTIL_SYSTEMCLOCK_H_
36 #define _BLAZE_UTIL_SYSTEMCLOCK_H_
96 inline time_t
start ()
const;
97 inline time_t
now ()
const;
144 return SystemClock::instance();
176 return time(
nullptr );
188 return std::time(
nullptr ) -
start_;
std::shared_ptr< SystemClock > SystemClockID
Handle for the system clock of the Blaze library.
Definition: SystemClockID.h:54
static time_t start_
Timestamp for the start of the process.
Definition: SystemClock.h:106
Implementation of a smart SystemClock handle.
#define BLAZE_BEFRIEND_SINGLETON
Friendship declaration for the Singleton class template.This macro has to be used in order to declare...
Definition: Singleton.h:404
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the Singleton class.
SystemClockID theSystemClock()
Returns a handle to the Blaze system clock.
Definition: SystemClock.h:142
SystemClock()
Constructor for the SystemClock class.
Definition: SystemClock.cpp:72
time_t now() const
Returns the current timestamp.
Definition: SystemClock.h:174
Base class for all lifetime managed singletons.The Singleton class represents the base class for all ...
Definition: Singleton.h:563
~SystemClock()
Destructor for the SystemClock class.
Definition: SystemClock.cpp:89
time_t elapsed() const
Returns the elapsed time since the start of the process (in seconds).
Definition: SystemClock.h:186
System clock of the Blaze library.The SystemClock class represents the system clock of the Blaze libr...
Definition: SystemClock.h:75
time_t start() const
Returns the timestamp for the start of the process.
Definition: SystemClock.h:162