161 clock_t finish = clock();
164 if (fabs(
time_ - t) < 1.e-9)
189 time_t finish = time(
nullptr) + time2Finish;
191 std::stringstream ss;
194 ss << ctime(&finish);
197 ss.seekp((
long) ss.tellp() - 1);
200 ss <<
" (" << time2Finish / 3600 <<
"h)";
double Mdouble
Definition: GeneralDefine.h:34
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Estimates the total time, in seconds, left to reach the end of any simulation. First,...
Definition: MercuryTime.h:130
std::string getFinishTime(Mdouble t)
Returns the estimated finish time based on the amount of time left to finish.
Definition: MercuryTime.h:183
Mdouble timeMax_
Stores the total simulation time (DPM units)
Definition: MercuryTime.h:212
clock_t startTime_
Stores the current number of clock ticks at the start.
Definition: MercuryTime.h:206
Time2Finish(Mdouble t, Mdouble tMax)
Initialises the variable start with the current value of clock ticks, the current time and the final ...
Definition: MercuryTime.h:139
Mdouble getTime2Finish(Mdouble t)
Estimates the total time, in seconds, left to reach the end of any simulation. After the class is ini...
Definition: MercuryTime.h:159
Mdouble time_
Stores the simulation time (DPM units)
Definition: MercuryTime.h:209
Allows for timing the algorithms; accurate up to 0.01 sec.
Definition: MercuryTime.h:46
std::chrono::time_point< std::chrono::high_resolution_clock > wallClockStart
Definition: MercuryTime.h:108
clock_t finish
Stores the number of clock ticks, called by Time::toc().
Definition: MercuryTime.h:113
std::chrono::time_point< std::chrono::high_resolution_clock > wallClockFinish
Definition: MercuryTime.h:114
Mdouble toc()
This is like a stop button of a stopwatch. Assigns the variable finish to the current value of ticks ...
Definition: MercuryTime.h:70
Time()
Definition: MercuryTime.h:49
Mdouble getWallTime()
Definition: MercuryTime.h:88
clock_t start
Stores the number of clock ticks, called by Time::tic().
Definition: MercuryTime.h:107
Mdouble toctic()
Outputs the toc value and resets the start time.
Definition: MercuryTime.h:96
Mdouble getCPUTime() const
Definition: MercuryTime.h:80
void tic()
This is like a start button of a stopwatch. Assigns the variable start with the current number of clo...
Definition: MercuryTime.h:59