![]() |
NumCpp
2.4.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::high_resolution_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 |
uint64 | toc (bool printElapsedTime=true) |
A timer class for timing code execution.
using nc::Timer< TimeUnit >::ChronoClock = std::chrono::high_resolution_clock |
using nc::Timer< TimeUnit >::TimePoint = std::chrono::time_point<ChronoClock> |
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 | bool whether or not to print the elapsed time to the console |