Quantum++
v0.8.2
C++11 quantum computing library
|
Chronometer. More...
#include <classes/timer.h>
Public Member Functions | |
Timer () noexcept | |
Constructs an instance with the current time as the starting point. More... | |
void | tic () noexcept |
Resets the chronometer. More... | |
const Timer & | toc () noexcept |
Stops the chronometer. More... | |
double | seconds () const noexcept |
Time passed in seconds. More... | |
Timer (const Timer &)=default | |
Default copy constructor. More... | |
Timer (Timer &&)=default | |
Default move constructor. More... | |
Timer & | operator= (const Timer &)=default |
Default copy assignment operator. More... | |
Timer & | operator= (Timer &&)=default |
Default move assignment operator. More... | |
virtual | ~Timer ()=default |
Default virtual destructor. More... | |
![]() | |
IDisplay ()=default | |
Default constructor. More... | |
IDisplay (const IDisplay &)=default | |
Default copy constructor. More... | |
IDisplay (IDisplay &&)=default | |
Default move constructor. More... | |
IDisplay & | operator= (const IDisplay &)=default |
Default copy assignment operator. More... | |
IDisplay & | operator= (IDisplay &&)=default |
Default move assignment operator. More... | |
virtual | ~IDisplay ()=default |
Default virtual destructor. More... | |
Protected Attributes | |
std::chrono::steady_clock::time_point | _start |
std::chrono::steady_clock::time_point | _end |
Private Member Functions | |
std::ostream & | display (std::ostream &os) const override |
qpp::IDisplay::display() override More... | |
Chronometer.
Uses a std::chrono::steady_clock. It is not affected by wall clock changes during runtime.
|
inlinenoexcept |
Constructs an instance with the current time as the starting point.
|
default |
Default copy constructor.
|
default |
Default move constructor.
|
virtualdefault |
Default virtual destructor.
|
inlineoverrideprivatevirtual |
qpp::IDisplay::display() override
os | Output stream |
Implements qpp::IDisplay.
|
inlinenoexcept |
Time passed in seconds.
|
inlinenoexcept |
Resets the chronometer.
Resets the starting/ending point to the current time
|
inlinenoexcept |
Stops the chronometer.
Set the current time as the ending point
|
protected |
|
protected |