#include <Timer.h>
Collaboration diagram for Timer:
Public Methods | |
Timer (std::ostream &aOut, const std::string &desc) | |
void | show () |
virtual | ~Timer () |
void | set_counter (size_t aCount, const std::string &count_desc) |
Private Methods | |
size_t | uptime () |
void | indent () |
Private Attributes | |
time_t | start |
std::string | description |
std::ostream & | out |
size_t | counter |
std::string | count_description |
Static Private Attributes | |
int | timer_counter = 0 |
Definition at line 44 of file Timer.h.
|
start timer Timer prints its info when it is destroyed. So all you have to do is declare a timer in an appropriate block.
|
|
|
|
Definition at line 53 of file Timer.h. Referenced by Timer::show(). |
|
Definition at line 59 of file Timer.h. Referenced by Timer::show(), and Timer::Timer(). |
|
Definition at line 88 of file Timer.h. Referenced by Timer::~Timer(). |
|
set a counter for a timer if you are timing single actions and for example do a loop over 10000 single actions you should set the counter to 10000. If you do the mean time for a single action is calculated.
|
|
Definition at line 46 of file Timer.h. Referenced by Timer::Timer(), and Timer::uptime(). |
|
Definition at line 47 of file Timer.h. Referenced by Timer::show(), and Timer::Timer(). |
|
Definition at line 48 of file Timer.h. Referenced by Timer::indent(), Timer::show(), and Timer::Timer(). |
|
Definition at line 49 of file Timer.h. Referenced by Timer::set_counter(), Timer::show(), and Timer::Timer(). |
|
Definition at line 50 of file Timer.h. Referenced by Timer::set_counter(), Timer::show(), and Timer::Timer(). |
|
Definition at line 24 of file Timer.cpp. Referenced by Timer::indent(), Timer::Timer(), and Timer::~Timer(). |
Contact me in case of errors or questions. This documentation is powered by ![]() |
(C) 2000-2002 ![]() |