|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
#include <triqs/utility/timer.hpp>
Accumulating wall-clock timer based on std::chrono::high_resolution_clock.
It accumulates total elapsed time across multiple start() and stop() intervals. The current total time in seconds, including any in-progress interval, can be retrieved by conversion to double.
Public Types | |
| using | clock_t = std::chrono::high_resolution_clock |
| Underlying clock type. | |
Public Member Functions | |
| bool | is_running () const |
| Whether the timer is currently running. | |
| operator double () const | |
| Implicit conversion to double (seconds). | |
| void | reset () |
| Reset the accumulated time to zero and put the timer in the stopped state. | |
| void | start () |
| Start (or resume) the timer. | |
| void | stop () |
| Stop the timer and add the elapsed interval to the running total. | |
|
inlinenodiscard |
|
inline |