ML Version of the Day
Loading...
Searching...
No Matches
MLAPI::TimeObject Class Reference

Class to track time spent in an object. More...

#include <MLAPI_TimeObject.h>

Inheritance diagram for MLAPI::TimeObject:
Collaboration diagram for MLAPI::TimeObject:

Public Member Functions

 TimeObject ()
 Constructor, set counter to 0.0.
 ~TimeObject ()
 Destructor.
void ResetTimer () const
 Resets the internal timer.
void UpdateTime () const
 Updates the internal timer with the time spent since the last call to ResetTimer().
void UpdateTime (double t) const
 Updates the internal timer with input value t.
double GetTime () const
 Returns the internally stored counter.

Protected Attributes

Epetra_Time Time_
 Object used to track time.
double TotalTime_
 Internal counter.

Detailed Description

Class to track time spent in an object.

Author
Marzio Sala, SNL 9214
Date
Last updated on Feb-05.

Constructor & Destructor Documentation

◆ TimeObject()

MLAPI::TimeObject::TimeObject ( )
inline

Constructor, set counter to 0.0.

References MLAPI::GetEpetra_Comm(), Epetra_Time::ResetStartTime(), Time_, and TotalTime_.

Member Function Documentation

◆ GetTime()

double MLAPI::TimeObject::GetTime ( ) const
inline

◆ ResetTimer()

◆ UpdateTime() [1/2]

◆ UpdateTime() [2/2]

void MLAPI::TimeObject::UpdateTime ( double t) const
inline

Updates the internal timer with input value t.

References TotalTime_.

Member Data Documentation

◆ Time_

Epetra_Time MLAPI::TimeObject::Time_
mutableprotected

Object used to track time.

Referenced by ResetTimer(), TimeObject(), and UpdateTime().

◆ TotalTime_

double MLAPI::TimeObject::TotalTime_
mutableprotected

Internal counter.

Referenced by GetTime(), TimeObject(), UpdateTime(), and UpdateTime().


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