Go to the documentation of this file.00001
00009 #ifndef TG_TIMER
00010 #define TG_TIMER
00011
00012 #ifdef _WIN32
00013 #include <windows.h>
00014 #else
00015 #include <time.h>
00016 #include <sys/time.h>
00017 #endif
00018
00019
00020
00021 namespace TomGine{
00022
00026 class tgTimer
00027 {
00028 private:
00029 #ifdef WIN32
00030 LONGLONG m_StartTicks;
00031 LONGLONG m_EndTicks;
00032 LONGLONG m_Frequency;
00033 double fNow;
00034 #else
00035 struct timespec AppStart, act, old;
00036 #endif
00037 double m_fAppTime;
00038 double m_fTime;
00039
00040 public:
00041 tgTimer(void);
00042 ~tgTimer(void);
00043
00044 void Reset();
00045 double Update();
00046
00047 double GetFrameTime(){ return m_fTime;}
00048 double GetApplicationTime(){ return m_fAppTime;}
00049 };
00050
00051 }
00052
00053 #endif
00054
blort
Author(s): Michael Zillich,
Thomas Mörwald,
Johann Prankl,
Andreas Richtsfeld,
Bence Magyar (ROS version)
autogenerated on Thu Jan 2 2014 11:38:26