Go to the documentation of this file.
41 #include <sys/resource.h>
47void Timer :: getUtime(std :: chrono :: duration< double > &answer)
50 clock_t utime = clock();
51 answer = std :: chrono :: seconds(utime / CLOCKS_PER_SEC);
54 getrusage(RUSAGE_SELF, & rsg);
55 answer = std :: chrono :: seconds(rsg.ru_utime.tv_sec) + std :: chrono :: microseconds(rsg.ru_utime.tv_usec);
59void Timer :: getTime(std :: chrono :: time_point< std :: chrono :: high_resolution_clock > &answer)
61 answer = std :: chrono :: high_resolution_clock :: now();
69void Timer :: startTimer()
77void Timer :: stopTimer()
83void Timer :: pauseTimer()
91void Timer :: resumeTimer()
98void Timer :: initTimer()
105double Timer :: getUtime()
111double Timer :: getWtime()
117void Timer :: convert2HMS(
int &nhrs,
int &nmin,
int &nsec,
double tsec)
119 long int _nsec = (
long int ) tsec;
135void Timer :: toString(
char *buff)
140void Timer :: updateElapsedTime()
154double EngngModelTimer :: getUtime(EngngModelTimer :: EngngModelTimerType t)
156 return timers [ t ].getUtime();
159double EngngModelTimer :: getWtime(EngngModelTimer :: EngngModelTimerType t)
161 return timers [ t ].getWtime();
164void EngngModelTimer :: convert2HMS(
int &nhrs,
int &nmin,
int &nsec,
double tsec)
166 Timer :: convert2HMS(nhrs, nmin, nsec, tsec);
169void EngngModelTimer :: toString(EngngModelTimer :: EngngModelTimerType t,
char *buff)
171 return timers [ t ].toString(buff);
Timer timers[EMTT_LastTimer]
Array of Timer classes.
std ::chrono ::time_point< std ::chrono ::high_resolution_clock > end_wtime
std ::chrono ::duration< double > end_utime
std ::chrono ::duration< double > elapsedUTime
void getTime(std ::chrono ::time_point< std ::chrono ::high_resolution_clock > &answer)
Platform independent wrapper for wall time.
bool running
Flag indicating whether timer is running.
std ::chrono ::duration< double > start_utime
User time.
double getUtime()
Returns total user time elapsed in seconds.
std ::chrono ::duration< double > elapsedWTime
Accumulated wtime and utime (in seconds) from start.
double getWtime()
Returns total elapsed wall clock time in seconds.
std ::chrono ::time_point< std ::chrono ::high_resolution_clock > start_wtime
Wall clock time markers.
This page is part of the
OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak
Bořek Patzák
Project e-mail:
oofem@fsv.cvut.cz
Generated at for OOFEM by
doxygen
1.15.0 written by Dimitri van Heesch,
© 1997-2011