RUSH
Reusable Utilities in Single Headers is a collection of header-only utilities for C++
|
A chrono class that automatically prints elapsed time. More...
#include <chrono.hpp>
Public Member Functions | |
Chronometer (std::string name="") | |
Constructor. | |
Chronometer (const Chronometer &)=delete | |
Chronometer (Chronometer &&) noexcept=delete | |
Chronometer & | operator= (const Chronometer &)=delete |
Chronometer & | operator= (Chronometer &&other) noexcept=delete |
Public Member Functions inherited from rush::chrono::Chrono< s > | |
Chrono (const Chrono &)=delete | |
Chrono (Chrono &&) noexcept=delete | |
Chrono & | operator= (const Chrono &)=delete |
Chrono & | operator= (Chrono &&other) noexcept=delete |
void | tic () |
Reset the chrono timer. | |
double | toc () const |
Get elapsed time since last tic. | |
std::string | unit () const |
Get unit as string. | |
A chrono class that automatically prints elapsed time.
T | Unit of time (default to seconds). |
|
inlineexplicit |
Constructor.
name | Optional name to be printed along with elapsed time. |