Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Macros | Functions
G4Timer.hh File Reference
#include <unistd.h>
#include <sys/times.h>
#include "G4Types.hh"
#include "G4ios.hh"
#include "G4Timer.icc"

Go to the source code of this file.

Data Structures

class  G4Timer
 

Macros

#define times   ostimes
 

Functions

std::ostream & operator<< (std::ostream &os, const G4Timer &t)
 

Macro Definition Documentation

#define times   ostimes

Definition at line 135 of file G4Timer.hh.

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const G4Timer t 
)

Definition at line 87 of file G4Timer.cc.

References G4Timer::GetRealElapsed(), G4Timer::GetSystemElapsed(), G4Timer::GetUserElapsed(), and G4Timer::IsValid().

88 {
89  if (t.IsValid())
90  {
91  os << "User=" << t.GetUserElapsed()
92  << "s Real=" << t.GetRealElapsed()
93  << "s Sys=" << t.GetSystemElapsed() << "s";
94  }
95  else
96  {
97  os << "User=****s Real=****s Sys=****s";
98  }
99  return os;
100 }
G4double GetSystemElapsed() const
Definition: G4Timer.cc:119
G4bool IsValid() const
G4double GetUserElapsed() const
Definition: G4Timer.cc:130
G4double GetRealElapsed() const
Definition: G4Timer.cc:107