Gaudi Framework, version v23r5

Home   Generated: Wed Nov 28 2012
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
System::ProcessTime Class Reference

Simple class to hold the time information of a process. More...

#include <Timing.h>

Public Types

typedef long long TimeValueType
 

Public Member Functions

 ProcessTime ()
 Constructor.
 
 ProcessTime (TimeValueType k, TimeValueType u, TimeValueType e)
 Constructor.
 
template<TimeType T>
TimeValueType kernelTime () const
 Retrieve the kernel time in the requested unit.
 
template<TimeType T>
TimeValueType userTime () const
 Retrieve the user time in the requested unit.
 
template<TimeType T>
TimeValueType elapsedTime () const
 Retrieve the elapsed time in the requested unit.
 
template<TimeType T>
TimeValueType cpuTime () const
 Retrieve the CPU (user+kernel) time in the requested unit.
 
ProcessTime operator- (const ProcessTime &rhs) const
 Return the delta between two ProcessTime objects.
 

Private Attributes

TimeValueType i_kernel
 Internal storage.
 
TimeValueType i_user
 
TimeValueType i_elapsed
 

Detailed Description

Simple class to hold the time information of a process.

Simplify the simultaneous handling of kernel, user and elapsed times of a process.

See Also
{bug #87341}

Definition at line 133 of file Timing.h.

Member Typedef Documentation

Definition at line 135 of file Timing.h.

Constructor & Destructor Documentation

System::ProcessTime::ProcessTime ( )
inline

Constructor.

Definition at line 138 of file Timing.h.

: i_kernel(0), i_user(0), i_elapsed(0) {}
System::ProcessTime::ProcessTime ( TimeValueType  k,
TimeValueType  u,
TimeValueType  e 
)
inline

Constructor.

Definition at line 141 of file Timing.h.

:
i_kernel(k), i_user(u), i_elapsed(e) {}

Member Function Documentation

template<TimeType T>
TimeValueType System::ProcessTime::cpuTime ( ) const
inline

Retrieve the CPU (user+kernel) time in the requested unit.

Definition at line 158 of file Timing.h.

{ return adjustTime<T>(i_user + i_kernel); }
template<TimeType T>
TimeValueType System::ProcessTime::elapsedTime ( ) const
inline

Retrieve the elapsed time in the requested unit.

Definition at line 154 of file Timing.h.

{ return adjustTime<T>(i_elapsed); }
template<TimeType T>
TimeValueType System::ProcessTime::kernelTime ( ) const
inline

Retrieve the kernel time in the requested unit.

Definition at line 146 of file Timing.h.

{ return adjustTime<T>(i_kernel); }
ProcessTime System::ProcessTime::operator- ( const ProcessTime rhs) const
inline

Return the delta between two ProcessTime objects.

Definition at line 161 of file Timing.h.

{
return ProcessTime(i_kernel - rhs.i_kernel,
i_user - rhs.i_user,
i_elapsed - rhs.i_elapsed);
}
template<TimeType T>
TimeValueType System::ProcessTime::userTime ( ) const
inline

Retrieve the user time in the requested unit.

Definition at line 150 of file Timing.h.

{ return adjustTime<T>(i_user); }

Member Data Documentation

TimeValueType System::ProcessTime::i_elapsed
private

Definition at line 168 of file Timing.h.

TimeValueType System::ProcessTime::i_kernel
private

Internal storage.

Definition at line 168 of file Timing.h.

TimeValueType System::ProcessTime::i_user
private

Definition at line 168 of file Timing.h.


The documentation for this class was generated from the following file:
Generated at Wed Nov 28 2012 12:17:43 for Gaudi Framework, version v23r5 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004