STIR 6.4.0
TimedObject.h
Go to the documentation of this file.
1#ifndef __TimedObject_H__
2#define __TimedObject_H__
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
23#include "stir/CPUTimer.h"
25
26START_NAMESPACE_STIR
36{
37public:
39 inline void reset_timers();
40
42
45 inline void stop_timers() const;
46
48
51 inline void start_timers(bool do_reset = false) const;
52
54 inline double get_CPU_timer_value() const;
55
57 inline double get_wall_clock_timer_value() const;
58
59private:
61
63 mutable CPUTimer cpu_timer;
64
66
68 mutable HighResWallClockTimer wall_clock_timer;
69};
70
71END_NAMESPACE_STIR
72
73#include "stir/TimedObject.inl"
74
75#endif
declares the stir::CPUTimer class.
High-resolution wall-clock timer stir::HighResWallClockTimer.
inline implementations for stir::TimedObject
A class for measuring elapsed CPU time.
Definition CPUTimer.h:97
High-resolution timer.
Definition HighResWallClockTimer.h:76
base class for all objects which need timers. At the moment, there's only a CPU timer.
Definition TimedObject.h:36
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