STIR 6.4.0
TimedObject.inl
Go to the documentation of this file.
1//
2//
13/*
14 Copyright (C) 2000 PARAPET partners
15 Copyright (C) 2000- 2009, Hammersmith Imanet Ltd
16 This file is part of STIR.
17
18 SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
19
20 See STIR/LICENSE.txt for details
21*/
22
23START_NAMESPACE_STIR
24
25void
27{
28 cpu_timer.reset();
29 wall_clock_timer.reset();
30}
31
32void
33TimedObject::start_timers(bool do_reset) const
34{
35 cpu_timer.start(do_reset);
36 wall_clock_timer.start(do_reset);
37}
38
39void
41{
42 cpu_timer.stop();
43 wall_clock_timer.stop();
44}
45
46double
48{
49 return cpu_timer.value();
50}
51
52double
54{
55 return wall_clock_timer.value();
56}
57
58END_NAMESPACE_STIR
double get_CPU_timer_value() const
get current value of the CPU timer (since first use or last reset)
Definition TimedObject.inl:47
void stop_timers() const
stop all timers kept by this object
Definition TimedObject.inl:40
void reset_timers()
reset all timers kept by this object
Definition TimedObject.inl:26
double get_wall_clock_timer_value() const
get current value of the wall-clock timer (since first use or last reset)
Definition TimedObject.inl:53
void start_timers(bool do_reset=false) const
start all timers kept by this object
Definition TimedObject.inl:33