Class timer#
Defined in File timer.hpp
Class Documentation#
-
class timer#
Public Functions
-
inline explicit timer(const std::string &name = std::string("main"))#
Constructor - starts timer with optional name.
Note
Prints “Starting <name>” to stdout
- Parameters:
name – Descriptive name for this timer instance (default: “main”)
-
inline ~timer()#
Destructor - prints elapsed time to stdout.
Automatically called when timer goes out of scope. Prints final elapsed time in seconds.
-
inline void reset()#
Reset the start time to current moment.
Useful for measuring intermediate segments of longer code blocks or repeating measurements without creating new timer objects.
-
inline explicit timer(const std::string &name = std::string("main"))#