UGDK
src/ugdk/time/timemanager.h
Go to the documentation of this file.
00001 #ifndef UGDK_TIME_TIMEMANAGER_H_
00002 #define UGDK_TIME_TIMEMANAGER_H_
00003 
00004 #include <ugdk/base/types.h>
00005 
00006 namespace ugdk {
00007 namespace time {
00008 
00009 class TimeManager {
00010   public:
00011     TimeManager();
00012     ~TimeManager() { }
00013 
00015     void Update();
00016 
00017     /*  @return Time elapsed since initialization, in milliseconds */
00018     uint32 TimeElapsed();
00019 
00020     // Devolve quanto tempo se passou desde a iteracao anterior, em milisegundos
00021     /*  @return Time elapsed since last frame, in milliseconds */
00022     uint32 TimeDifference();
00023 
00024     // Devolve quanto tempo se passou desde um ponto no tempo
00025     uint32 TimeSince(uint32 t0);
00026 
00027   private:
00028     uint32 initial_time_, current_time_, last_update_;
00029 };
00030 
00031 }  // namespace time
00032 }  // namespace ugdk
00033 
00034 #endif  // HORUSEYE_FRAMEWORK_TIMEHANDLER_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines