Chronometer.
More...
#include <classes/timer.h>
|
CLOCK_T::time_point | start_ |
|
CLOCK_T::time_point | end_ |
|
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
class qpp::Timer< T, CLOCK_T >
Chronometer.
- Template Parameters
-
T | Tics duration, default is std::chrono::duration<double, 1>, i.e. seconds in double precision |
CLOCK_T | Clock's type, default is std::chrono::steady_clock, not affected by wall clock changes during runtime |
◆ Timer() [1/3]
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
Constructs an instance with the current time as the starting point.
◆ Timer() [2/3]
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
Default copy constructor.
◆ Timer() [3/3]
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
Default move constructor.
◆ ~Timer()
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
Default virtual destructor.
◆ display()
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
std::ostream& qpp::Timer< T, CLOCK_T >::display |
( |
std::ostream & |
os | ) |
const |
|
inlineoverrideprivatevirtual |
◆ get_duration()
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
template<typename U = T>
U qpp::Timer< T, CLOCK_T >::get_duration |
( |
| ) |
const |
|
inlinenoexcept |
Duration specified by U.
- Template Parameters
-
U | Duration, default is T, which defaults to std::chrono::duration<double, 1>, i.e. seconds in double precision |
- Returns
- Duration that passed between the instantiation/reset and invocation of qpp::Timer::toc()
◆ operator=() [1/2]
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
Default copy assignment operator.
◆ operator=() [2/2]
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
Default move assignment operator.
◆ tic()
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
Resets the chronometer.
Resets the starting/ending point to the current time
◆ tics()
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
Time passed in the duration specified by T.
- Returns
- Number of tics (specified by T) that passed between the instantiation/reset and invocation of qpp::Timer::toc()
◆ toc()
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
Stops the chronometer.
Set the current time as the ending point
- Returns
- Reference to the current instance
◆ end_
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
CLOCK_T::time_point qpp::Timer< T, CLOCK_T >::end_ |
|
protected |
◆ start_
template<typename T = std::chrono::duration<double>, typename CLOCK_T = std::chrono::steady_clock>
CLOCK_T::time_point qpp::Timer< T, CLOCK_T >::start_ |
|
protected |
The documentation for this class was generated from the following file: