CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
LinuxCPUTime Class Reference

#include <LinuxCPUTime.h>

Public Types

typedef double TimeType
 

Public Member Functions

TimeType cputime () const
 
 LinuxCPUTime (int pid=0)
 constructor More...
 
TimeType operator() () const
 
TimeType stime () const
 
TimeType utime () const
 
 ~LinuxCPUTime ()
 destructor More...
 

Private Attributes

TimeType stime_
 
TimeType utime_
 

Detailed Description

Definition at line 16 of file LinuxCPUTime.h.

Member Typedef Documentation

typedef double LinuxCPUTime::TimeType

Definition at line 19 of file LinuxCPUTime.h.

Constructor & Destructor Documentation

LinuxCPUTime::LinuxCPUTime ( int  pid = 0)
inlineexplicit

constructor

Definition at line 23 of file LinuxCPUTime.h.

23  :
24  utime_(std::clock()/CLOCKS_PER_SEC), stime_(0) {
25  }
TimeType utime_
Definition: LinuxCPUTime.h:37
TimeType stime_
Definition: LinuxCPUTime.h:38
LinuxCPUTime::~LinuxCPUTime ( )
inline

destructor

Definition at line 28 of file LinuxCPUTime.h.

28 {}

Member Function Documentation

TimeType LinuxCPUTime::cputime ( ) const
inline

Definition at line 33 of file LinuxCPUTime.h.

References stime_, and utime_.

Referenced by operator()().

33 { return utime_+stime_;}
TimeType utime_
Definition: LinuxCPUTime.h:37
TimeType stime_
Definition: LinuxCPUTime.h:38
TimeType LinuxCPUTime::operator() ( ) const
inline

Definition at line 34 of file LinuxCPUTime.h.

References cputime().

34 { return cputime();}
TimeType cputime() const
Definition: LinuxCPUTime.h:33
TimeType LinuxCPUTime::stime ( ) const
inline

Definition at line 32 of file LinuxCPUTime.h.

References stime_.

32 { return stime_;}
TimeType stime_
Definition: LinuxCPUTime.h:38
TimeType LinuxCPUTime::utime ( ) const
inline

Definition at line 31 of file LinuxCPUTime.h.

References utime_.

Referenced by LinuxElapsedTime::~LinuxElapsedTime().

31 { return utime_;}
TimeType utime_
Definition: LinuxCPUTime.h:37

Member Data Documentation

TimeType LinuxCPUTime::stime_
private

Definition at line 38 of file LinuxCPUTime.h.

Referenced by cputime(), and stime().

TimeType LinuxCPUTime::utime_
private

Definition at line 37 of file LinuxCPUTime.h.

Referenced by cputime(), and utime().