[ GAMB | Source | Keywords | Summary | Ancestors | All Members | Descendants ]
public: | |
Timer(); | |
Timer(const char* const tmID); | |
~Timer(); | |
void | reset(); |
void | start(); |
void | stop(); |
float | operator()() const; |
friend ostream& | operator<<(ostream& out, const Timer& tm); |
protected: |
copyright: SAMBA Group , Tel-Aviv Univ. Israel, 1998.
first example:
Timer timer("prog_time"); ... doing preprocessing ... some debugging info cout << timer; ( how much time preprocessing & debugging took.) .... doing matching .... some debugging info cout << timer ; (how much time preprocessing , matching & debugging took.) .... doing verification cout << timer; (how much time the whole program took including debugging)
second example:
Timer timer("on_off_time"); .... doing preprocessing timer.stop(); .... som debugging info cout << timer; (how much time preprocessing took.) .... doing matching .... some debugging info cout << timer; (how much time preprocessing took.) .... doing verification cout << timer; (how much time preprocessing took.)
third example:
Timer timer("on_off_time"); .... doing preprocessing timer.stop(); .... some debugging info cout << timer; (how much time preprocessing took.) timer.start(); .... doing matching cout << timer; (how much time only preprocessing and matching took.) timer.stop(); .... some debugging info timer.start(); .... doing verification cout << timer; (how much time preprocessing took.)
Timer();
Empty constructor. Resetting the start to zero. Assuming null Id.
Timer();
Timer(const char* const tmID);
special possibilty if you want to keep different timers and
differentiate them by an ID
Timer(const char* const tmID);
~Timer();
destructor
~Timer();
void reset();
resetting the time so clock will be current clock and sum of clocks
will be zero
void reset();
void start();
Enable the timer to continue after a stop operation has been performed
void start();
void stop();
Stopping the timer operation
void stop();
float operator()() const;
If the timer is stopped returning the sec of proc time
accumalated in memory. Otherwise the time accumalated in memory and
the time form the last start operation until present.
float operator()() const;
friend ostream& operator<<(ostream& out, const Timer& tm);
printing the i.d and the time (on what time is printed see operator())
friend ostream& operator<<(ostream& out, const Timer& tm);
public: | ||
---|---|---|
void | reset(); | |
void | start(); | |
void | stop(); | |
float | operator()() const; | |
friend ostream& | operator<<(ostream& out, const Timer& tm); | |
protected: |
Report problems to jkotula@unimax.com