- Main Page
- Modules
- Classes
- Namespaces
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Related Functions
TimeStamp Class Reference
Time Measuring and Counting

## Detailed Description

This class stores five time values.

- a real time
- a user cpu time
- a system cpu time
- a user cpu time of children
- a system cpu time of children

TimeStamp's can be added to or substracted from each other and they can be pushed to a stream.

In most cases, perhaps the Timer or the TimeReport class is what you want to use instead.

`#include <lemon/time_measure.h>`

## Public Types
enum | Format { NORMAL = 0, SHORT = 1 }
| Display format specifier. More...

## Public Member Functions
void | stamp ()
| Read the current time values of the process.
| TimeStamp ()
| Constructor initializing with zero.
| TimeStamp (void *)
| Constructor initializing with the current time values of the process.
TimeStamp & | reset ()
| Set every time value to zero.
TimeStamp & | operator+= (const TimeStamp &b)
TimeStamp | operator+ (const TimeStamp &b) const
TimeStamp & | operator-= (const TimeStamp &b)
TimeStamp | operator- (const TimeStamp &b) const
TimeStamp & | operator*= (double b)
TimeStamp | operator* (double b) const
TimeStamp & | operator/= (double b)
TimeStamp | operator/ (double b) const
TimeStamp | ellapsed () const
| The time ellapsed since the last call of stamp()
double | userTime () const
| Gives back the user time of the process.
double | systemTime () const
| Gives back the system time of the process.
double | cUserTime () const
| Gives back the user time of the process' children. More...
double | cSystemTime () const
| Gives back the user time of the process' children. More...
double | realTime () const
| Gives back the real time.

## Static Public Member Functions
static void | format (Format f)
| Set output format. More...
static Format | format ()
| Retrieve the current output format. More...

## Related Functions
(Note that these are not member functions.)
std::ostream & | operator<< (std::ostream &os, const TimeStamp &t)
| Prints the time counters. More...

## Member Enumeration Documentation

enum Format

Enumerator
NORMAL | Reports all measured values.
SHORT | Only real time and an error indicator is displayed.

## Member Function Documentation

static void format | ( | Format | f | ) |
| inline static

Set output format.

The output format is global for all timestamp instances.

static Format format | ( |  | ) |
| inline static

Retrieve the current output format

The output format is global for all timestamp instances.

double cUserTime | ( |  | ) | const
| inline

Note
  On `WIN32` platform this value is not calculated.

double cSystemTime | ( |  | ) | const
| inline

Note
  On `WIN32` platform this value is not calculated.