STIR  6.2.0
TimedObject.h
Go to the documentation of this file.
1 #ifndef __TimedObject_H__
2 #define __TimedObject_H__
3 
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 
26 START_NAMESPACE_STIR
36 {
37 public:
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 
59 private:
61 
63  mutable CPUTimer cpu_timer;
64 
66 
68  mutable HighResWallClockTimer wall_clock_timer;
69 };
70 
71 END_NAMESPACE_STIR
72 
73 #include "stir/TimedObject.inl"
74 
75 #endif
High-resolution wall-clock timer stir::HighResWallClockTimer.
base class for all objects which need timers. At the moment, there's only a CPU timer.
Definition: TimedObject.h:35
inline implementations for stir::TimedObject
A class for measuring elapsed CPU time.
Definition: CPUTimer.h:96
declares the stir::CPUTimer class.
High-resolution timer.
Definition: HighResWallClockTimer.h:75