#include <itpp/base/timing.h>
Inheritance diagram for itpp::Real_Timer:

Public Member Functions | |
| Real_Timer () | |
| Create a new timer. Sets the time to zero. | |
| 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 | |
| double | get_current_time () const |
| 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. | |
Measures real time.
Usage: Define a time object:
Real_Timer timer;
Actions: Reset:
timer.reset();
timer.start();
timer.stop();
elapsedtime = timer.get_time();
It is possible to get elapsed time without stopping the timer. Observe that it is also possible to use the macros "time.tic();" to reset and start clock and "time.toc_print();" to print the elapsed time.
Definition at line 138 of file timing.h.
|
|
Create a new timer. Sets the time to zero.
|
|
|
Vitrual function that returns teh current time.
Implements itpp::Timer. Definition at line 148 of file timing.cpp. |
|
|
Start the timer. This does not set the time to zero.
Definition at line 87 of file timing.cpp. References itpp::Timer::get_current_time(), itpp::Timer::running, and itpp::Timer::start_time. Referenced by itpp::pause(), and itpp::Timer::tic(). |
|
|
Stop the timer. Returns the elapsed time in seconds.
Definition at line 95 of file timing.cpp. References itpp::Timer::elapsed_time, itpp::Timer::get_current_time(), itpp::Timer::running, and itpp::Timer::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 itpp::Timer::elapsed_time, itpp::Timer::running, itpp::Timer::start_time, and itpp::Timer::stop_time. Referenced by itpp::Timer::tic(), and itpp::Timer::Timer(). |
|
|
Resets the timer and starts it.
Definition at line 121 of file timing.cpp. References itpp::Timer::reset(), and itpp::Timer::start(). Referenced by itpp::tic(). |
|
|
Returns the elapsed time since last tic().
Definition at line 127 of file timing.cpp. References itpp::Timer::get_time(). Referenced by itpp::toc(). |
|
|
Prints the elapsed time since last tic().
Definition at line 132 of file timing.cpp. References itpp::Timer::get_time(). Referenced by itpp::toc_print(). |
|
|
Returns the elapsed time.
Definition at line 114 of file timing.cpp. References itpp::Timer::elapsed_time, itpp::Timer::get_current_time(), itpp::Timer::running, and itpp::Timer::start_time. Referenced by itpp::Timer::toc(), and itpp::Timer::toc_print(). |
|
|
The start time of the timer.
Definition at line 72 of file timing.h. Referenced by itpp::Timer::get_time(), itpp::Timer::reset(), and itpp::Timer::start(). |
|
|
The stop time of the timer.
Definition at line 74 of file timing.h. Referenced by itpp::Timer::reset(), and itpp::Timer::stop(). |
|
|
The ellapsed time from start to stop.
Definition at line 76 of file timing.h. Referenced by itpp::Timer::get_time(), itpp::Timer::reset(), and itpp::Timer::stop(). |
|
|
A bool that indicates if the timer is running or not.
Definition at line 78 of file timing.h. Referenced by itpp::Timer::get_time(), itpp::Timer::reset(), itpp::Timer::start(), and itpp::Timer::stop(). |
Generated on Fri Jan 11 08:51:42 2008 for IT++ by Doxygen 1.3.9.1