|
SolidUtils
|
This class is used to perform wall timings of varius tasks. It provides means to meanually start and stop a timer: More...
#include <Timer.hpp>
Classes | |
| class | Scope |
| This class provides a means of timing a scoped region. It begins timing when it is created, and adds its duration to the parent timer when it is destroyed. More... | |
Public Member Functions | |
| Timer () | |
| Creat a new timer. | |
| Scope | scope () |
| Start a new timed scope. The duration from when the Scope object is created. More... | |
| void | start () |
| Start or continue the timer. | |
| void | stop () |
| Stop the timer. | |
| double | poll () const |
| Get the elapsed number of seconds on the timer. More... | |
| void | add (double duration) |
| Add some amount of time to the timer. More... | |
Static Public Member Functions | |
| static double | now () |
| Get a double representing the current time in seconds. This is an arbitrary value by itself, but the relation between return values of two calls is the duration in seconds elapsed. More... | |
This class is used to perform wall timings of varius tasks. It provides means to meanually start and stop a timer:
It also provides a means to time a scoped environment:
|
inline |
Add some amount of time to the timer.
| duration | The time to add. |
|
inlinestatic |
Get a double representing the current time in seconds. This is an arbitrary value by itself, but the relation between return values of two calls is the duration in seconds elapsed.
|
inline |
Get the elapsed number of seconds on the timer.
|
inline |
Start a new timed scope. The duration from when the Scope object is created.
1.8.13