Timer.pkg 918 B

123456789101112131415161718192021222324252627282930313233
  1. $#include "Timer.h"
  2. class Time : public Object
  3. {
  4. unsigned GetFrameNumber() const;
  5. float GetTimeStep() const;
  6. unsigned GetTimerPeriod() const;
  7. float GetElapsedTime();
  8. static unsigned GetSystemTime();
  9. static String GetTimeStamp();
  10. static void Sleep(unsigned mSec);
  11. tolua_readonly tolua_property__get_set unsigned frameNumber;
  12. tolua_readonly tolua_property__get_set float timeStep;
  13. tolua_readonly tolua_property__get_set unsigned timerPeriod;
  14. tolua_readonly tolua_property__get_set float elapsedTime;
  15. };
  16. Time* GetTime();
  17. tolua_readonly tolua_property__get_set Time* time;
  18. ${
  19. #define TOLUA_DISABLE_tolua_CoreLuaAPI_GetTime00
  20. static int tolua_CoreLuaAPI_GetTime00(lua_State* tolua_S)
  21. {
  22. return ToluaGetSubsystem<Time>(tolua_S);
  23. }
  24. #define TOLUA_DISABLE_tolua_get_time_ptr
  25. #define tolua_get_time_ptr tolua_CoreLuaAPI_GetTime00
  26. $}