Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Timer Class Reference
[Miscellaneous Tools]

#include <lemon/time_measure.h>

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


Public Member Functions

 Timer ()
 Constructor. It starts with zero time counters.
 operator TimeStamp () const
 Computes the ellapsed time.
void reset ()
 Resets the time counters.
double getUserTime () const
 Gives back the ellapsed user time of the process.
double getSystemTime () const
 Gives back the ellapsed system time of the process.
double getCUserTime () const
 Gives back the ellapsed user time of the process' children.
double getCSystemTime () const
 Gives back the ellapsed user time of the process' children.
double getRealTime () const
 Gives back the ellapsed real time of the process.


Member Function Documentation

operator TimeStamp  )  const [inline]
 

This conversion computes the ellapsed time since the construction of t or since the last t.reset().

void reset  )  [inline]
 

Resets the time counters


The documentation for this class was generated from the following file:
Generated on Sat Aug 27 14:16:14 2005 for LEMON by  doxygen 1.4.4