00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkTimeProbe.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/11/23 16:53:26 $ 00007 Version: $Revision: 1.5 $ 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 #ifndef __itkTimeProbe_H 00018 #define __itkTimeProbe_H 00019 00020 00021 #include "itkRealTimeClock.h" 00022 #include "itkWin32Header.h" 00023 00024 00025 namespace itk 00026 { 00027 00039 class ITKCommon_EXPORT TimeProbe 00040 { 00041 00042 public: 00043 00045 typedef unsigned long CountType; 00046 00049 typedef RealTimeClock::TimeStampType TimeStampType; 00050 00051 public: 00052 00054 TimeProbe(); 00055 00057 ~TimeProbe(); 00058 00060 void Start(void); 00061 00063 void Stop(void); 00064 00066 CountType GetNumberOfStarts(void) const; 00067 00069 CountType GetNumberOfStops(void) const; 00070 00074 TimeStampType GetMeanTime(void) const; 00075 00076 private: 00077 00078 TimeStampType m_Start; 00079 TimeStampType m_TotalTime; 00080 00081 CountType m_NumberOfStarts; 00082 CountType m_NumberOfStops; 00083 00084 RealTimeClock::Pointer m_RealTimeClock; 00085 }; 00086 00087 00088 } 00089 00090 #endif