23 Timer() : STOPPED(true), COUNTER(0),
24 T_START(clock()), DELTA_T_STORE(0), m_deltaWall(0.0) {
29 Timer(std::string name) : STOPPED(true), COUNTER(0),
30 T_START(clock()), DELTA_T_STORE(0), m_deltaWall(0.0) {
38 if (gettimeofday(&time,NULL)){
42 return (
double)time.tv_sec + (double)time.tv_usec * .000001;
78 clock_t T_START, DELTA_T_STORE;
80 double m_wallStart, m_deltaWall;
A simple CPU-clock-tick timer for timing metods.
double get_time() const
Return the time.
void start()
Start the timer & reset stored time to zero.
double time_per_count() const
int & counter()
Increment an internal discrete counter.
void print() const
Write a string to cout stating the time taken.
void stop()
Stop the clock & add the current time interval to the previously stored values ready for printing.
void reset()
Pause the clock & add the time interval to the stored cumulative time.
A collection of OO numerical routines aimed at simple (typical) applied problems in continuum mechani...