ITK  5.4.0
Insight Toolkit
itkRealTimeStamp.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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 itkRealTimeStamp_h
19 #define itkRealTimeStamp_h
20 
21 #include "itkRealTimeInterval.h"
22 #include "itkMacro.h"
23 #include <iostream>
24 
25 namespace itk
26 {
45 class ITKCommon_EXPORT RealTimeStamp
46 {
47 public:
49 
50  friend class RealTimeClock;
51 
53  RealTimeStamp();
54 
56  ~RealTimeStamp();
57 
58  RealTimeStamp(const RealTimeStamp &) = default;
60  operator=(const RealTimeStamp &) = default;
61  RealTimeStamp(RealTimeStamp &&) = default;
63  operator=(RealTimeStamp &&) = default;
64 
67 
70  GetTimeInMicroSeconds() const;
72  GetTimeInMilliSeconds() const;
74  GetTimeInSeconds() const;
76  GetTimeInMinutes() const;
78  GetTimeInHours() const;
80  GetTimeInDays() const;
85  operator-(const Self &) const;
86  Self
87  operator+(const RealTimeInterval &) const;
88  Self
89  operator-(const RealTimeInterval &) const;
90  const Self &
91  operator+=(const RealTimeInterval &);
92  const Self &
93  operator-=(const RealTimeInterval &);
97  bool
98  operator>(const Self &) const;
99  bool
100  operator<(const Self &) const;
101  bool
102  operator==(const Self &) const;
103  ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self);
104  bool
105  operator<=(const Self &) const;
106  bool
107  operator>=(const Self &) const;
111  friend ITKCommon_EXPORT std::ostream &
112  operator<<(std::ostream & os, const RealTimeStamp & v);
113 
114 private:
115  using SecondsCounterType = uint64_t;
116  using MicroSecondsCounterType = uint64_t;
117 
120 
123 
127 };
128 
129 } // end of namespace itk
130 
131 #endif // itkRealTimeStamp_h
itk::RealTimeStamp::SecondsDifferenceType
RealTimeInterval::SecondsDifferenceType SecondsDifferenceType
Definition: itkRealTimeStamp.h:121
itk::operator<
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:559
itk::operator<=
bool operator<=(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:573
itk::operator<<
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
Definition: itkArray.h:216
itk::RealTimeInterval::MicroSecondsDifferenceType
int64_t MicroSecondsDifferenceType
Definition: itkRealTimeInterval.h:52
itk::operator-
ConstNeighborhoodIterator< TImage > operator-(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
Definition: itkConstNeighborhoodIterator.h:672
itk::RealTimeStamp
The RealTimeStamp is a data structure for representing time with high precision and a large dynamic r...
Definition: itkRealTimeStamp.h:45
itk::RealTimeInterval::SecondsDifferenceType
int64_t SecondsDifferenceType
Definition: itkRealTimeInterval.h:51
itk::RealTimeStamp::SecondsCounterType
uint64_t SecondsCounterType
Definition: itkRealTimeStamp.h:115
itkRealTimeInterval.h
itkMacro.h
itk::operator>=
bool operator>=(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:580
itk::operator>
bool operator>(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:566
itk::operator==
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:545
itk::RealTimeClock
Provides a timestamp from a real-time clock.
Definition: itkRealTimeClock.h:39
itk::RealTimeStamp::TimeRepresentationType
RealTimeInterval::TimeRepresentationType TimeRepresentationType
Definition: itkRealTimeStamp.h:66
itk::RealTimeStamp::MicroSecondsCounterType
uint64_t MicroSecondsCounterType
Definition: itkRealTimeStamp.h:116
itk::RealTimeInterval
A data structure for representing the time span between two RealTimeStamps, with similar high precisi...
Definition: itkRealTimeInterval.h:45
itk::RealTimeInterval::TimeRepresentationType
double TimeRepresentationType
Definition: itkRealTimeInterval.h:64
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::RealTimeStamp::m_Seconds
SecondsCounterType m_Seconds
Definition: itkRealTimeStamp.h:125
itk::RealTimeStamp::m_MicroSeconds
MicroSecondsCounterType m_MicroSeconds
Definition: itkRealTimeStamp.h:126
itk::operator+
ConstNeighborhoodIterator< TImage > operator+(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
Definition: itkConstNeighborhoodIterator.h:654
itk::RealTimeStamp::MicroSecondsDifferenceType
RealTimeInterval::MicroSecondsDifferenceType MicroSecondsDifferenceType
Definition: itkRealTimeStamp.h:122