![]() |
NumCpp
2.16.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
A timer class for timing code execution. More...
#include <Timer.hpp>
Public Types | |
| using | ChronoClock = std::chrono::steady_clock |
| using | TimePoint = std::chrono::time_point< ChronoClock > |
Public Member Functions | |
| Timer () | |
| Timer (const std::string &inName) | |
| void | setName (const std::string &inName) |
| void | sleep (uint32 length) |
| void | tic () noexcept |
| TimeUnit | toc (PrintElapsedTime printElapsedTime=PrintElapsedTime::YES) |
A timer class for timing code execution.
| using nc::Timer< TimeUnit >::TimePoint = std::chrono::time_point<ChronoClock> |
Constructor
Constructor
| inName |
Sets/changes the timer name
| inName |
Sleeps the current thread
| length | the length of time to sleep |
|
inline |
Stops the timer
| printElapsedTime | whether or not to print the elapsed time to the console |