casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
casa::utilj::ThreadTimes Class Reference

#include <UtilJ.h>

Inheritance diagram for casa::utilj::ThreadTimes:
casa::utilj::DeltaThreadTimes

Public Member Functions

 ThreadTimes ()
 
double cpu () const
 
void clear ()
 
bool empty () const
 
double elapsed () const
 
DeltaThreadTimes operator- (const ThreadTimes &tEarlier) const
 

Static Public Member Functions

static ThreadTimes getTime ()
 
static double toSeconds (const struct timeval &t)
 

Protected Member Functions

 ThreadTimes (double elapsed, double cpu)
 

Protected Attributes

bool empty_p
 
double cpu_p
 
double elapsed_p
 

Detailed Description

Definition at line 391 of file UtilJ.h.

Constructor & Destructor Documentation

casa::utilj::ThreadTimes::ThreadTimes ( )
inline

Definition at line 395 of file UtilJ.h.

References getTime().

Referenced by getTime().

casa::utilj::ThreadTimes::ThreadTimes ( double  elapsed,
double  cpu 
)
inlineprotected

Definition at line 442 of file UtilJ.h.

Member Function Documentation

void casa::utilj::ThreadTimes::clear ( )
inline

Definition at line 398 of file UtilJ.h.

References empty_p.

double casa::utilj::ThreadTimes::cpu ( ) const
inline

Definition at line 397 of file UtilJ.h.

References cpu_p.

Referenced by casa::utilj::DeltaThreadTimes::cpu(), and getTime().

double casa::utilj::ThreadTimes::elapsed ( ) const
inline

Definition at line 400 of file UtilJ.h.

References elapsed_p.

Referenced by casa::utilj::DeltaThreadTimes::elapsed(), and getTime().

bool casa::utilj::ThreadTimes::empty ( ) const
inline

Definition at line 399 of file UtilJ.h.

References empty_p.

static ThreadTimes casa::utilj::ThreadTimes::getTime ( )
inlinestatic

double cpu = ((double) clock ()) / CLOCKS_PER_SEC; // should be in seconds

Definition at line 403 of file UtilJ.h.

References cpu(), casacore::C::e, elapsed(), getrusage(), ThreadTimes(), and toSeconds().

Referenced by ThreadTimes().

DeltaThreadTimes casa::utilj::ThreadTimes::operator- ( const ThreadTimes tEarlier) const
static double casa::utilj::ThreadTimes::toSeconds ( const struct timeval &  t)
inlinestatic

Definition at line 431 of file UtilJ.h.

References casacore::C::e.

Referenced by getTime().

Member Data Documentation

double casa::utilj::ThreadTimes::cpu_p
protected

Definition at line 439 of file UtilJ.h.

Referenced by cpu().

double casa::utilj::ThreadTimes::elapsed_p
protected

Definition at line 440 of file UtilJ.h.

Referenced by elapsed().

bool casa::utilj::ThreadTimes::empty_p
protected

Definition at line 438 of file UtilJ.h.

Referenced by clear(), and empty().


The documentation for this class was generated from the following file: