zz::time::Timer Class Reference
A timer class. More...
#include <zupply.hpp>
Public Member Functions | |
void | reset () |
Reset timer to record new process. | |
void | pause () |
Pause recording timelapse. | |
void | resume () |
Resume timer. | |
std::size_t | elapsed_ns () |
Return elapsed time quantized in nanosecond. More... | |
std::string | elapsed_ns_str () |
Return string of elapsed time quantized in nanosecond. More... | |
std::size_t | elapsed_us () |
Return elapsed time quantized in microsecond. More... | |
std::string | elapsed_us_str () |
Return string of elapsed time quantized in microsecond. More... | |
std::size_t | elapsed_ms () |
Return elapsed time quantized in millisecond. More... | |
std::string | elapsed_ms_str () |
Return string of elapsed time quantized in millisecond. More... | |
std::size_t | elapsed_sec () |
Return elapsed time quantized in second. More... | |
std::string | elapsed_sec_str () |
Return string of elapsed time quantized in second. More... | |
double | elapsed_sec_double () |
Return elapsed time in second, no quantization. More... | |
std::string | to_string (const char *format="[%ms ms]") |
Convert timer to user friendly string. Support various formats. More... | |
Detailed Description
A timer class.
Member Function Documentation
std::size_t zz::time::Timer::elapsed_ms | ( | ) |
Return elapsed time quantized in millisecond.
- Returns
- Millisecond elapsed
std::string zz::time::Timer::elapsed_ms_str | ( | ) |
Return string of elapsed time quantized in millisecond.
- Returns
- Millisecond elapsed in string
std::size_t zz::time::Timer::elapsed_ns | ( | ) |
Return elapsed time quantized in nanosecond.
- Returns
- Nanosecond elapsed
std::string zz::time::Timer::elapsed_ns_str | ( | ) |
Return string of elapsed time quantized in nanosecond.
- Returns
- Nanosecond elapsed in string
std::size_t zz::time::Timer::elapsed_sec | ( | ) |
Return elapsed time quantized in second.
- Returns
- Second elapsed
double zz::time::Timer::elapsed_sec_double | ( | ) |
Return elapsed time in second, no quantization.
- Returns
- Second elapsed in double
std::string zz::time::Timer::elapsed_sec_str | ( | ) |
Return string of elapsed time quantized in second.
- Returns
- Second elapsed in string
std::size_t zz::time::Timer::elapsed_us | ( | ) |
Return elapsed time quantized in microsecond.
- Returns
- Microsecond elapsed
std::string zz::time::Timer::elapsed_us_str | ( | ) |
Return string of elapsed time quantized in microsecond.
- Returns
- Microsecond elapsed in string
std::string zz::time::Timer::to_string | ( | const char * | format = "[%ms ms]" | ) |
Convert timer to user friendly string. Support various formats.
- Parameters
-
format
- Returns
- Formatted string
The documentation for this class was generated from the following files:
- zupply.hpp
- zupply.cpp