Timer Class Reference
[Miscellaneous Tools]

#include <time_measure.h>

Collaboration diagram for Timer:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class measuring the cpu time and real time usage of the process. It is quite easy-to-use, here is a short example.
      include<lemon/time_measure.h>
      include<iostream>
     
     int main()
     {
     
       ...
     
       Timer T;
       doSomething();
       std::cout << T << '\n';
       T.reset();
       doSomethingElse();
       std::cout << T << '\n';
     
       ...
     
     }

Todo:
This shouldn't be Unix (Linux) specific.
Author:
Alpar Juttner

Definition at line 168 of file time_measure.h.

Public Member Functions

 Timer ()
 Constructor. It starts with zero time counters.
 operator TimeStamp ()
 Computes the ellapsed time.
TimeStamp reset ()
 Resets the time counters.


Member Function Documentation

operator TimeStamp  )  [inline]
 

This conversion computes the ellapsed time since the construction of t or since the last t.reset(). Definition at line 183 of file time_measure.h.

References TimeStamp::stamp().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Thu Sep 30 12:18:39 2004 for LEMON by doxygen 1.3.8