Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuHWTimer.h

Go to the documentation of this file.
00001 #ifndef _HWTIMER_H_
00002 #define _HWTIMER_H_
00003 
00004 #if defined(WIN32)
00005 #include <windows.h>
00006 #else
00007 #include <sys/time.h>
00008 #endif
00009 
00019 class vuHWTimer
00020 {
00021 public:
00023 
00026     vuHWTimer();
00028     vuHWTimer(const vuHWTimer& t);
00030     ~vuHWTimer();
00031 
00033     vuHWTimer& operator=(const vuHWTimer& rhs);
00034 
00036 
00038     bool isSupported(void) const;
00039 
00041 
00045     float getElapsedTimeFloat(void);
00047 
00051     double getElapsedTimeDouble(void);
00052 
00053     // Causes the program to halt until s seconds have
00054     // elapsed since the last call to GetElapsedTimeFloat,
00055     // GetElapsedTimeDouble, SleepFloat, or SleepDouble.
00056     // Before the function returns, the timer is updated.
00057 
00059 
00064     void sleepFloat(float s);
00066 
00071     void sleepDouble(double s);
00072 
00073 private:
00074 #if defined(WIN32)
00075     LARGE_INTEGER  m_LastCount;  
00076     float          m_FloatFreq;  
00077     double         m_DoubleFreq; 
00078 #else
00079     struct timeval m_LastCount; 
00080 #endif
00081     bool           m_IsSupported; 
00082 };
00083 
00084 #endif

Generated on Wed Dec 15 21:20:34 2004 for vuVolume by  doxygen 1.3.9.1