#include <timer.hpp>
Public Methods | |
| timer () | |
| Default constructs the timer object. | |
| void | clear () |
| Clears the memory belonging to tms_begin & tms_end and sets elapsed_begin and elapsed_end to 0. | |
| void | start () |
| Starts the timer. | |
| void | stop () |
| Stops the timer. | |
| size_t | real_time () const |
| Computes the real time used. This is typically the sum of the user and system times. | |
| size_t | user_time () const |
| Computes the user time used. This is the time that the program spends in the user space, executing user space code. | |
| size_t | system_time () const |
| Computes the system time used. This is the time that the program spends in the kernel space, executing kernel space code. | |
|
|
Default constructs the timer object.
|
|
|
Clears the memory belonging to tms_begin & tms_end and sets elapsed_begin and elapsed_end to 0.
|
|
|
Computes the real time used. This is typically the sum of the user and system times.
|
|
|
Starts the timer.
|
|
|
Stops the timer.
|
|
|
Computes the system time used. This is the time that the program spends in the kernel space, executing kernel space code.
|
|
|
Computes the user time used. This is the time that the program spends in the user space, executing user space code.
|
1.2.18