5 #include "MPI_Object.h"
52 inline static CORE_UniquePointer<MPI_Chrono>
New() {
53 CORE_UniquePointer<MPI_Chrono> p(
new MPI_Chrono(),
115 mStartTime=(tULLInt)MPI_Wtime();
122 return ((tULLInt)MPI_Wtime())-mStartTime;
155 ret.insert(0,std::to_string((duration%60))+
"s ");
158 ret.insert(0,std::to_string((duration%60))+
"m ");
161 ret.insert(0,std::to_string((duration%24))+
"h ");
164 ret.insert(0,std::to_string((duration))+
"d ");
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:278
This class is a time class to manage time within an environment.
Definition: MPI_Chrono.h:20
virtual tMemSize getContentsMemorySize() const override
return the memory size of the included associations
Definition: MPI_Chrono.h:76
static tULLInt ConvertDuration(tULLInt duration, tUInt &d, tUInt &h, tUInt &m, tUInt &s)
convert the duration as days,hours,minutes,second,milliseconds,microseconds
Definition: MPI_Chrono.h:176
const tULLInt & getDuration() const
get the duration in second
Definition: MPI_Chrono.h:137
MPI_Chrono & operator+=(const tULLInt &t)
operator +=
Definition: MPI_Chrono.h:93
void start()
start the chrono
Definition: MPI_Chrono.h:114
virtual tMemSize getMemorySize() const override
return the memory size of the class
Definition: MPI_Chrono.h:64
virtual ~MPI_Chrono(void)
destroy
Definition: MPI_Chrono.h:41
static CORE_UniquePointer< MPI_Chrono > New()
create a new instance of class within an unique pointer
Definition: MPI_Chrono.h:52
tULLInt stop() const
stop the chrono
Definition: MPI_Chrono.h:121
static tString ConvertDurationToString(tULLInt duration)
convert the duration the duration to string
Definition: MPI_Chrono.h:151
static tReal GetTime()
get the time
Definition: MPI_Chrono.h:101
void setDuration(const tULLInt &d)
set the duration in second
Definition: MPI_Chrono.h:144
MPI_Chrono & operator=(const tULLInt &t)
operator =
Definition: MPI_Chrono.h:86
void addToDuration(const tULLInt &t)
add to duration
Definition: MPI_Chrono.h:128
MPI_Chrono()
create a root environment
Definition: MPI_Chrono.h:32
This class is a base class of E-MicromM core package.
Definition: MPI_Object.h:32