CMS 3D CMS Logo

Public Member Functions | Static Public Attributes | Private Attributes

LinuxElapsedTime Class Reference

#include <LinuxCPUTime.h>

List of all members.

Public Member Functions

 LinuxElapsedTime (const std::string &iname="Total", std::ostream &iout=*dout)
 ~LinuxElapsedTime ()

Static Public Attributes

static std::ostream * dout = &std::cout

Private Attributes

LinuxCPUTime begin
std::string name
std::ostream & out

Detailed Description

Definition at line 41 of file LinuxCPUTime.h.


Constructor & Destructor Documentation

LinuxElapsedTime::LinuxElapsedTime ( const std::string &  iname = "Total",
std::ostream &  iout = *dout 
) [inline]

Definition at line 44 of file LinuxCPUTime.h.

                                            : out(iout), name(iname){}
LinuxElapsedTime::~LinuxElapsedTime ( )

Definition at line 6 of file LinuxCPUTime.cc.

References begin, end, name, out, and LinuxCPUTime::utime().

                                    {
  LinuxCPUTime end;
  out << "\n" << name << " CPU elapsed time " 
      << end.utime()-begin.utime() 
      << std::endl;  
}

Member Data Documentation

Definition at line 51 of file LinuxCPUTime.h.

Referenced by ~LinuxElapsedTime().

std::ostream * LinuxElapsedTime::dout = &std::cout [static]

Definition at line 43 of file LinuxCPUTime.h.

std::string LinuxElapsedTime::name [private]

Definition at line 50 of file LinuxCPUTime.h.

Referenced by ~LinuxElapsedTime().

std::ostream& LinuxElapsedTime::out [private]

Definition at line 49 of file LinuxCPUTime.h.

Referenced by ~LinuxElapsedTime().