ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkRealTimeStamp.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 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 
50 
51  friend class RealTimeClock;
52 
54  RealTimeStamp();
55 
57  ~RealTimeStamp();
58 
61 
63  TimeRepresentationType GetTimeInMicroSeconds() const;
64  TimeRepresentationType GetTimeInMilliSeconds() const;
65  TimeRepresentationType GetTimeInSeconds() const;
66  TimeRepresentationType GetTimeInMinutes() const;
67  TimeRepresentationType GetTimeInHours() const;
68  TimeRepresentationType GetTimeInDays() const;
70 
72  RealTimeInterval operator-( const Self & ) const;
73  Self operator+( const RealTimeInterval & ) const;
74  Self operator-( const RealTimeInterval & ) const;
75  const Self & operator+=( const RealTimeInterval & );
76  const Self & operator-=( const RealTimeInterval & );
78 
80  bool operator>( const Self & ) const;
81  bool operator<( const Self & ) const;
82  bool operator==( const Self & ) const;
83  bool operator!=( const Self & ) const;
84  bool operator<=( const Self & ) const;
85  bool operator>=( const Self & ) const;
87 
89  friend ITKCommon_EXPORT std::ostream & operator<<(std::ostream & os, const RealTimeStamp & v);
90 
91 private:
92 
95 
98 
101 
105 
106 };
107 
108 } // end of namespace itk
109 
110 #endif // itkRealTimeStamp_h
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:485
ConstNeighborhoodIterator< TImage > operator-(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
bool operator>(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:507
RealTimeInterval::SecondsDifferenceType SecondsDifferenceType
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
Definition: itkArray.h:188
MicroSecondsCounterType m_MicroSeconds
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...
A data structure for representing the time span between two RealTimeStamps, with similar high precisi...
bool operator<=(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:514
bool operator!=(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:492
ConstNeighborhoodIterator< TImage > operator+(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:499
uint64_t MicroSecondsCounterType
SecondsCounterType m_Seconds
RealTimeInterval::MicroSecondsDifferenceType MicroSecondsDifferenceType
::uint64_t uint64_t
Definition: itkIntTypes.h:35
bool operator>=(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:521
RealTimeInterval::TimeRepresentationType TimeRepresentationType