|
STIR 6.4.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 | |
| void | stop () |
| stop stopwatch | |
| void | reset () |
| reset stopwatch | |
| 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(), reset(), and start().
Referenced by stir::distributable_computation(), stir::distributable_computation_cache_enabled(), stir::OSSPSReconstruction< TargetT >::precompute_denominator_of_conditioner_without_penalty(), stir::LmToProjData::process_data(), stir::FourierRebinning::rebin(), stir::ProjDataInfoTests::run_Blocks_DOI_test(), stir::ProjDataInfoTests::run_coordinate_test(), stir::ProjDataInfoTests::run_coordinate_test_for_realistic_scanner(), stir::RigidObject3DTransformationTests::run_tests(), stir::ProjMatrixByBinPinholeSPECTUB::set_up(), stir::ProjMatrixByBinSPECTUB::set_up(), and start().
|
inline |
reset stopwatch
the stopwatch should not be running
References reset().
Referenced by stir::OSSPSReconstruction< TargetT >::precompute_denominator_of_conditioner_without_penalty(), reset(), stir::ProjDataInfoTests::run_Blocks_DOI_test(), stir::ProjDataInfoTests::run_coordinate_test(), stir::ProjDataInfoTests::run_coordinate_test_for_realistic_scanner(), stir::RigidObject3DTransformationTests::run_tests(), and start().