|
libidx
|
A timer class. More...
#include <utils.h>
Public Member Functions | |
| void | start () |
| Start timer. | |
| void | stop () |
| Stop timer. | |
| void | restart () |
| Restart timer (and call reset()). | |
| void | reset () |
| Reset the accumulation of milliseconds. | |
| double | elapsed_minutes () |
| Return elapsed time in minutes since start() or restart(). | |
| long | elapsed_seconds () |
| Return elapsed time in seconds since start() or restart(). | |
| long | elapsed_milliseconds () |
| Return elapsed time in milliseconds since start() or restart(). | |
| long | elapsed_microseconds () |
| Return elapsed time in microseconds since start() or restart(). | |
| long | accumulated_milliseconds () |
| Return all accumulated milliseconds since last reset()/restart(). | |
| void | pretty_elapsed () |
| Print elapsed time in a human-friendly way since start() or restart(). | |
| void | pretty_secs (long seconds) |
| Print the provided seconds in a human-friendly way. | |
| string | elapsed (long seconds) |
| Return seconds in a human-friendly string. | |
| string | elapsed () |
| Return elapsed time in a human-friendly string since start()/restart(). | |
| string | elapsed_ms (long milliseconds) |
| string | elapsed_ms () |
| string | accumulated_ms () |
| string | eta (uint n, uint total) |
A timer class.
| string ebl::timer::accumulated_ms | ( | ) |
Return elapsed time in a human-friendly string since start()/restart(), with millisecond precision.
| string ebl::timer::elapsed_ms | ( | ) |
Return elapsed time in a human-friendly string since start()/restart(), with millisecond precision.
| std::string ebl::timer::elapsed_ms | ( | long | milliseconds | ) |
Return seconds in a human-friendly string, with millisecond precision
| string ebl::timer::eta | ( | uint | n, |
| uint | total | ||
| ) |
Return a string with the human-friendly remaining time based on elapsed time and n/total progress.