Class Timer measures the time elapsed since the timer was started.
More...
#include <shambase/include/shambase/time.hpp>
|
| void | start () |
| | Starts the timer.
|
| |
| void | end () |
| | Stops the timer and stores the elapsed time in nanoseconds.
|
| |
| std::string | get_time_str () const |
| | Converts the stored nanosecond time to a string representation.
|
| |
| f64 | elasped_sec () const |
| | Converts the stored nanosecond time to a floating point representation in seconds.
|
| |
Class Timer measures the time elapsed since the timer was started.
Definition at line 96 of file time.hpp.
◆ Timer()
| shambase::Timer::Timer |
( |
| ) |
|
|
inline |
◆ elasped_sec()
| f64 shambase::Timer::elasped_sec |
( |
| ) |
const |
|
inline |
Converts the stored nanosecond time to a floating point representation in seconds.
- Returns
- f64 The elapsed time in seconds.
Definition at line 123 of file time.hpp.
◆ end()
| void shambase::Timer::end |
( |
| ) |
|
|
inline |
Stops the timer and stores the elapsed time in nanoseconds.
Definition at line 111 of file time.hpp.
◆ get_time_str()
| std::string shambase::Timer::get_time_str |
( |
| ) |
const |
|
inline |
Converts the stored nanosecond time to a string representation.
- Returns
- std::string A string representation of the elapsed time.
Definition at line 117 of file time.hpp.
◆ start()
| void shambase::Timer::start |
( |
| ) |
|
|
inline |
Starts the timer.
Definition at line 106 of file time.hpp.
◆ nanosec
| f64 shambase::Timer::nanosec |
Time in nanosecond.
Definition at line 100 of file time.hpp.
◆ timer
| plf::nanotimer shambase::Timer::timer |
Internal timer.
Definition at line 98 of file time.hpp.
The documentation for this class was generated from the following file: