NumCpp
2.12.1
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 >::ChronoClock = std::chrono::steady_clock |
using nc::Timer< TimeUnit >::TimePoint = std::chrono::time_point<ChronoClock> |
|
inline |
Constructor
|
inlineexplicit |
Constructor
inName |
|
inline |
Sets/changes the timer name
inName |
|
inline |
Sleeps the current thread
length | the length of time to sleep |
|
inlinenoexcept |
Starts the timer
|
inline |
Stops the timer
printElapsedTime | whether or not to print the elapsed time to the console |