|
STIR
6.3.0
|
A general base class for timers. Interface is like a stop watch. More...
#include "stir/Timer.h"

Public Member Functions | |
| void | start (bool do_reset=false) |
| start stopwatch, optionally resetting first More... | |
| void | stop () |
| stop stopwatch | |
| void | reset () |
| reset stopwatch More... | |
| double | value () const |
| return value is undefined when start() is not called first. | |
Protected Member Functions | |
| virtual double | get_current_value () const =0 |
Protected Attributes | |
| bool | running |
| double | previous_value |
| double | previous_total_value |
A general base class for timers. Interface is like a stop watch.
Derived classes simply have to implement the virtual function double get_current_value()
|
inline |
start stopwatch, optionally resetting first
the stopwatch should not be running already if asking to reset
References stir::error().
Referenced by stir::OSSPSReconstruction< TargetT >::precompute_denominator_of_conditioner_without_penalty(), stir::FourierRebinning::rebin(), stir::RigidObject3DTransformationTests::run_tests(), stir::ProjMatrixByBinSPECTUB::set_up(), stir::ProjMatrixByBinPinholeSPECTUB::set_up(), stir::ScatterSimulation::set_use_cache(), stir::Transform3DObjectImageProcessor< elemT >::Transform3DObjectImageProcessor(), stir::ProjMatrixByBinPinholeSPECTUB::~ProjMatrixByBinPinholeSPECTUB(), and stir::ProjMatrixByBinSPECTUB::~ProjMatrixByBinSPECTUB().
|
inline |
reset stopwatch
the stopwatch should not be running
Referenced by stir::OSSPSReconstruction< TargetT >::precompute_denominator_of_conditioner_without_penalty(), and stir::RigidObject3DTransformationTests::run_tests().
1.8.13