#include <itpp/base/timing.h>
Inheritance diagram for itpp::Timer:
Public Member Functions | |
Timer () | |
Create a new timer. Sets the time to zero. | |
virtual | ~Timer () |
Virtual destructor. | |
void | start (void) |
Start the timer. This does not set the time to zero. | |
double | stop (void) |
Stop the timer. Returns the elapsed time in seconds. | |
void | reset (double t=0.0) |
Sets the time to time t, which is zero by default. Stops the timer if it is running. | |
void | tic (void) |
Resets the timer and starts it. | |
double | toc (void) |
Returns the elapsed time since last tic(). | |
void | toc_print (void) |
Prints the elapsed time since last tic(). | |
double | get_time () const |
Returns the elapsed time. | |
Protected Member Functions | |
virtual double | get_current_time () const =0 |
Vitrual function that returns teh current time. | |
Protected Attributes | |
double | start_time |
The start time of the timer. | |
double | stop_time |
The stop time of the timer. | |
double | elapsed_time |
The ellapsed time from start to stop. | |
bool | running |
A bool that indicates if the timer is running or not. |
Definition at line 47 of file timing.h.
|
Create a new timer. Sets the time to zero.
Definition at line 82 of file timing.cpp. References reset(). |
|
Virtual destructor.
|
|
Start the timer. This does not set the time to zero.
Definition at line 87 of file timing.cpp. References get_current_time(), running, and start_time. Referenced by itpp::pause(), and tic(). |
|
Stop the timer. Returns the elapsed time in seconds.
Definition at line 95 of file timing.cpp. References elapsed_time, get_current_time(), running, start_time, and stop_time. |
|
Sets the time to time t, which is zero by default. Stops the timer if it is running.
Definition at line 106 of file timing.cpp. References elapsed_time, running, start_time, and stop_time. |
|
Resets the timer and starts it.
Definition at line 121 of file timing.cpp. References reset(), and start(). Referenced by itpp::tic(). |
|
Returns the elapsed time since last tic().
Definition at line 127 of file timing.cpp. References get_time(). Referenced by itpp::toc(). |
|
Prints the elapsed time since last tic().
Definition at line 132 of file timing.cpp. References get_time(). Referenced by itpp::toc_print(). |
|
Returns the elapsed time.
Definition at line 114 of file timing.cpp. References elapsed_time, get_current_time(), running, and start_time. Referenced by itpp::pause(), toc(), and toc_print(). |
|
Vitrual function that returns teh current time.
Implemented in itpp::CPU_Timer, and itpp::Real_Timer. Referenced by get_time(), start(), and stop(). |
|
The start time of the timer.
Definition at line 72 of file timing.h. Referenced by get_time(), reset(), start(), and stop(). |
|
The stop time of the timer.
|
|
The ellapsed time from start to stop.
Definition at line 76 of file timing.h. Referenced by get_time(), reset(), and stop(). |
|
A bool that indicates if the timer is running or not.
Definition at line 78 of file timing.h. Referenced by get_time(), reset(), start(), and stop(). |
Generated on Thu Apr 19 14:20:02 2007 for IT++ by Doxygen 1.4.6