ITK  6.0.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:
48  ITK_DEFAULT_COPY_AND_MOVE(RealTimeStamp);
49 
51 
52  friend class RealTimeClock;
53 
55  RealTimeStamp();
56 
58  ~RealTimeStamp();
59 
62 
65  GetTimeInMicroSeconds() const;
67  GetTimeInMilliSeconds() const;
69  GetTimeInSeconds() const;
71  GetTimeInMinutes() const;
73  GetTimeInHours() const;
75  GetTimeInDays() const;
80  operator-(const Self &) const;
81  Self
82  operator+(const RealTimeInterval &) const;
83  Self
84  operator-(const RealTimeInterval &) const;
85  const Self &
86  operator+=(const RealTimeInterval &);
87  const Self &
88  operator-=(const RealTimeInterval &);
92  bool
93  operator>(const Self &) const;
94  bool
95  operator<(const Self &) const;
96  bool
97  operator==(const Self &) const;
98  ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self);
99  bool
100  operator<=(const Self &) const;
101  bool
102  operator>=(const Self &) const;
106  friend ITKCommon_EXPORT std::ostream &
107  operator<<(std::ostream & os, const RealTimeStamp & v);
108 
109 private:
110  using SecondsCounterType = uint64_t;
111  using MicroSecondsCounterType = uint64_t;
112 
115 
118 
122 };
123 
124 } // end of namespace itk
125 
126 #endif // itkRealTimeStamp_h
itk::RealTimeStamp::SecondsDifferenceType
RealTimeInterval::SecondsDifferenceType SecondsDifferenceType
Definition: itkRealTimeStamp.h:116
itk::operator<
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:557
itk::operator<=
bool operator<=(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:571
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::operator<<
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
itk::RealTimeStamp::SecondsCounterType
uint64_t SecondsCounterType
Definition: itkRealTimeStamp.h:110
itkRealTimeInterval.h
itkMacro.h
itk::operator>=
bool operator>=(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:578
itk::operator>
bool operator>(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:564
itk::operator==
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:543
itk::RealTimeClock
Provides a timestamp from a real-time clock.
Definition: itkRealTimeClock.h:39
itk::RealTimeStamp::TimeRepresentationType
RealTimeInterval::TimeRepresentationType TimeRepresentationType
Definition: itkRealTimeStamp.h:61
itk::RealTimeStamp::MicroSecondsCounterType
uint64_t MicroSecondsCounterType
Definition: itkRealTimeStamp.h:111
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: itkAnatomicalOrientation.h:29
itk::RealTimeStamp::m_Seconds
SecondsCounterType m_Seconds
Definition: itkRealTimeStamp.h:120
itk::RealTimeStamp::m_MicroSeconds
MicroSecondsCounterType m_MicroSeconds
Definition: itkRealTimeStamp.h:121
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:117