Go to the documentation of this file.00001
00002 #ifndef TIMER_H
00003 #define TIMER_H
00004 #pragma once
00005
00006 #ifdef _WIN32
00007 #include <windows.h>
00008 #else
00009 #include <time.h>
00010 #include <sys/time.h>
00011 #endif
00012
00013
00014
00015 namespace Tracking{
00016
00017 class Timer
00018 {
00019 private:
00020 #ifdef WIN32
00021 LONGLONG m_StartTicks;
00022 LONGLONG m_EndTicks;
00023 LONGLONG m_Frequency;
00024 double fNow;
00025 #else
00026 struct timespec AppStart, act, old;
00027 #endif
00028 double m_fAppTime;
00029 double m_fTime;
00030
00031
00032 public:
00033 Timer(void);
00034 ~Timer(void);
00035
00036 void Reset();
00037 double Update();
00038
00039 double GetFrameTime(){ return m_fTime;}
00040 double GetApplicationTime(){ return m_fAppTime;}
00041
00042 };
00043
00044 }
00045
00046 #endif
00047
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