CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

LinuxCPUTime Class Reference

#include <LinuxCPUTime.h>

List of all members.

Public Types

typedef double TimeType

Public Member Functions

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

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) [inline, explicit]

constructor

Definition at line 23 of file LinuxCPUTime.h.

                                  : 
    utime_(std::clock()/CLOCKS_PER_SEC), stime_(0) {
  }
LinuxCPUTime::~LinuxCPUTime ( ) [inline]

destructor

Definition at line 28 of file LinuxCPUTime.h.

{}

Member Function Documentation

TimeType LinuxCPUTime::cputime ( ) const [inline]

Definition at line 33 of file LinuxCPUTime.h.

References stime_, and utime_.

Referenced by operator()().

{ return utime_+stime_;}
TimeType LinuxCPUTime::operator() ( ) const [inline]

Definition at line 34 of file LinuxCPUTime.h.

References cputime().

{ return cputime();}
TimeType LinuxCPUTime::stime ( ) const [inline]

Definition at line 32 of file LinuxCPUTime.h.

References stime_.

{ return stime_;}
TimeType LinuxCPUTime::utime ( ) const [inline]

Definition at line 31 of file LinuxCPUTime.h.

References utime_.

Referenced by LinuxElapsedTime::~LinuxElapsedTime().

{ return utime_;}

Member Data Documentation

Definition at line 38 of file LinuxCPUTime.h.

Referenced by cputime(), and stime().

Definition at line 37 of file LinuxCPUTime.h.

Referenced by cputime(), and utime().