00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkRealTimeClock.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/11/29 14:51:11 $ 00007 Version: $Revision: 1.4 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef __itkRealTimeClock_h 00019 #define __itkRealTimeClock_h 00020 00021 #include <itkMacro.h> 00022 #include <itkObject.h> 00023 #include <itkObjectFactory.h> 00024 00025 namespace itk 00026 { 00027 00038 class ITKCommon_EXPORT RealTimeClock : public itk::Object 00039 { 00040 00041 public: 00042 00043 typedef RealTimeClock Self; 00044 typedef itk::Object Superclass; 00045 typedef itk::SmartPointer< Self > Pointer; 00046 typedef itk::SmartPointer< const Self > ConstPointer; 00047 00049 itkTypeMacro(RealTimeClock, Object); 00050 00052 itkNewMacro(Self); 00053 00055 typedef double TimeStampType; 00056 00058 typedef double FrequencyType; 00059 00061 TimeStampType GetTimeStamp() const; 00062 TimeStampType GetTimestamp() const 00063 { 00064 itkWarningMacro("This call is deprecated. " 00065 "Its namimg was not conforming to ITK Style. " 00066 "Please use GetTimeStamp() instead. Note the capital S"); 00067 return this->GetTimeStamp(); 00068 } 00069 00071 itkGetConstMacro(Frequency, FrequencyType); 00072 00073 protected: 00074 00076 RealTimeClock(); 00077 00079 virtual ~RealTimeClock(); 00080 00082 virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const; 00083 00084 private: 00085 00086 FrequencyType m_Frequency; 00087 00088 TimeStampType m_Difference; 00089 00090 TimeStampType m_Origin; 00091 00092 }; 00093 00094 } // end of namespace itk 00095 00096 00097 #endif // __itkRealTimeClock_h