C++ mpi module for stochmagnet_main Package
Public Member Functions | Static Public Member Functions | List of all members
MPI_Chrono Class Reference

This class is a time class to manage time within an environment. More...

#include <MPI_Chrono.h>

Inheritance diagram for MPI_Chrono:
Inheritance graph
[legend]
Collaboration diagram for MPI_Chrono:
Collaboration graph
[legend]

Public Member Functions

 MPI_Chrono ()
 create a root environment
 
virtual ~MPI_Chrono (void)
 destroy
 
virtual tMemSize getMemorySize () const override
 return the memory size of the class
 
virtual tMemSize getContentsMemorySize () const override
 return the memory size of the included associations More...
 
MPI_Chronooperator= (const tULLInt &t)
 operator = More...
 
MPI_Chronooperator+= (const tULLInt &t)
 operator += More...
 
void start ()
 start the chrono
 
tULLInt stop () const
 stop the chrono More...
 
void addToDuration (const tULLInt &t)
 add to duration More...
 
const tULLInt & getDuration () const
 get the duration in second More...
 
void setDuration (const tULLInt &d)
 set the duration in second More...
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 
virtual tString toString () const
 return the string representation of the object node More...
 

Static Public Member Functions

static CORE_UniquePointer< MPI_ChronoNew ()
 create a new instance of class within an unique pointer More...
 
static tReal GetTime ()
 get the time More...
 
static tString ConvertDurationToString (tULLInt duration)
 convert the duration the duration to string More...
 
static tULLInt ConvertDuration (tULLInt duration, tUInt &d, tUInt &h, tUInt &m, tUInt &s)
 convert the duration as days,hours,minutes,second,milliseconds,microseconds More...
 
- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Additional Inherited Members

- Protected Member Functions inherited from MPI_Object
 MPI_Object (void)
 create
 
virtual ~MPI_Object (void)
 destroy
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Detailed Description

This class is a time class to manage time within an environment.

Member Function Documentation

◆ addToDuration()

void MPI_Chrono::addToDuration ( const tULLInt &  t)
inline

add to duration

Parameters
[in]t: time in second to add to duration

◆ ConvertDuration()

static tULLInt MPI_Chrono::ConvertDuration ( tULLInt  duration,
tUInt &  d,
tUInt &  h,
tUInt &  m,
tUInt &  s 
)
inlinestatic

convert the duration as days,hours,minutes,second,milliseconds,microseconds

Parameters
[in]durationduration in ms
[out]dnumber of days
[out]hnumber of hours
[out]mnumber of minutes
[out]snumber of seconds

◆ ConvertDurationToString()

static tString MPI_Chrono::ConvertDurationToString ( tULLInt  duration)
inlinestatic

convert the duration the duration to string

Parameters
[in]durationduration in s

◆ getContentsMemorySize()

virtual tMemSize MPI_Chrono::getContentsMemorySize ( ) const
inlineoverridevirtual

return the memory size of the included associations

Returns
the memory size of the storage in bytes 1 Kb = 1024 bytes 1 Mb = 1024 Kb 1 Gb = 1024 Mb 1 Tb = 1024 Gb 1 Hb = 1024 Tb

Reimplemented from CORE_Object.

◆ getDuration()

const tULLInt& MPI_Chrono::getDuration ( ) const
inline

get the duration in second

return the duration in second

◆ GetTime()

static tReal MPI_Chrono::GetTime ( )
inlinestatic

get the time

Returns
the time in seconds

◆ New()

static CORE_UniquePointer<MPI_Chrono> MPI_Chrono::New ( )
inlinestatic

create a new instance of class within an unique pointer

Returns
a new unique pointer of this class

◆ operator+=()

MPI_Chrono& MPI_Chrono::operator+= ( const tULLInt &  t)
inline

operator +=

Parameters
[in]t: duration time to add in second

◆ operator=()

MPI_Chrono& MPI_Chrono::operator= ( const tULLInt &  t)
inline

operator =

Parameters
[in]t: initial duration time in second

◆ setDuration()

void MPI_Chrono::setDuration ( const tULLInt &  d)
inline

set the duration in second

Parameters
[in]dduration in s

◆ stop()

tULLInt MPI_Chrono::stop ( ) const
inline

stop the chrono

Returns
the duration in seconds between the start method called and the stop method called

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