ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkRealTimeClock.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkRealTimeClock_h
19 #define itkRealTimeClock_h
20 
21 #include "itkMacro.h"
22 #include "itkObject.h"
23 #include "itkObjectFactory.h"
24 #include "itkRealTimeStamp.h"
25 
26 namespace itk
27 {
39 class ITKCommon_EXPORT RealTimeClock:public Object
40 {
41 public:
43  typedef Object Superclass;
46 
48  itkTypeMacro(RealTimeClock, Object);
49 
51  itkNewMacro(Self);
52 
54  typedef double TimeStampType;
55 
57  typedef double FrequencyType;
58 
60  TimeStampType GetTimeInSeconds() const;
61 
63  itkGetConstMacro(Frequency, FrequencyType);
64 
66  RealTimeStamp GetRealTimeStamp() const;
67 
68 protected:
69 
71  RealTimeClock();
72 
74  virtual ~RealTimeClock();
75 
77  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
78 
79 private:
83 
84  // We hide this method in the private section, because it returns the
85  // modified time of the itk::Object. That modified time is ambiguous with
86  // the role of the RealTimeStamp.
87  virtual const TimeStamp & GetTimeStamp() const ITK_OVERRIDE;
88 };
89 } // end of namespace itk
90 
91 #endif // itkRealTimeClock_h
TimeStampType m_Difference
Light weight base class for most itk classes.
RealTimeClock Self
Provides a timestamp from a real-time clock.
The RealTimeStamp is a data structure for representing time with high precision and a large dynamic r...
Generate a unique, increasing time value.
Definition: itkTimeStamp.h:58
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:57
TimeStampType m_Origin
SmartPointer< Self > Pointer
FrequencyType m_Frequency