|
Easy3D 2.6.1
|
A high resolution stop watch/timer. More...
#include <easy3d/util/stop_watch.h>
Public Member Functions | |
| StopWatch () | |
| default constructor. The watch will automatically start after construction. | |
| ~StopWatch ()=default | |
| destructor. | |
| void | start () |
| starts the timer | |
| void | restart () |
| restarts the timer. It has the same effect as start() | |
| double | elapsed_seconds (int num_digits=1) const |
| returns user elapsed time (in seconds) since the construction / start. | |
| std::string | time_string (int num_digits=1) const |
| the elapsed time string, e.g., 88ms, 2.3s, 1.7m, 0.1h. This function automatically determines the best unit. | |
A high resolution stop watch/timer.
This timer is able to measure the elapsed time with 1 micro-second accuracy on Windows, Linux, and Unix. Usage example: