TBCI Numerical high perf. C++ Library 2.8.0
stopwatch_e Class Reference

Stopwatch class using gettimeofday() / _ftime() / time() to measure elapsed (= wall clock) time. More...

#include <stopwatch.h>

Inheritance diagram for stopwatch_e:
Collaboration diagram for stopwatch_e:

Public Member Functions

 stopwatch_e ()
 
- Public Member Functions inherited from stopw_base
 stopw_base (const double tick, const double over=-1.0)
 c'tor
 
virtual ~stopw_base ()
 d'tor
 
double reset ()
 Resets the stopwatch.
 
void start ()
 Starts the stopwatch.
 
double stop ()
 Stops the stopwatch and returns total time (since last reset)
 
double stop_d ()
 Stops the stopwatch and returns time since last start / read.
 
double read ()
 Returns the total time without stopping the stopwatch (but resets the differential timer)
 
double read_d ()
 Returns the time since last read/start without stopping the stopwatch (but resets the differential timer)
 

Protected Member Functions

double seconds () const
 Return the current time, to be overriden in derived classes.
 
- Protected Member Functions inherited from stopw_base
double adv_stopwatch ()
 Advance the stopwatch, return diff, handle single overflows.
 

Additional Inherited Members

- Protected Attributes inherited from stopw_base
double last_time
 The last time we read/started/stopped the clock.
 
double total
 The total elapsed time since construction or reset.
 
const double secs_per_tick
 Used in seconds() to convert internal time to s.
 
const double overflow_secs
 If we overflow once, we miss this many seconds; We assume that internally long ints are used, i.e.
 
int running
 The status.
 

Detailed Description

Stopwatch class using gettimeofday() / _ftime() / time() to measure elapsed (= wall clock) time.

Definition at line 256 of file stopwatch.h.

Constructor & Destructor Documentation

◆ stopwatch_e()

stopwatch_e::stopwatch_e ( )
inline

Definition at line 267 of file stopwatch.h.

References stopw_base::stopw_base().

Member Function Documentation

◆ seconds()

double stopwatch_e::seconds ( ) const
inlineprotectedvirtual

Return the current time, to be overriden in derived classes.

Reimplemented from stopw_base.

Definition at line 259 of file stopwatch.h.

References NULL.


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