diff options
Diffstat (limited to 'src/core/application.h')
-rw-r--r-- | src/core/application.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/application.h b/src/core/application.h index e55c37f..229f318 100644 --- a/src/core/application.h +++ b/src/core/application.h @@ -30,9 +30,12 @@ public: /*----- inspectors ----------------------------------------------- */ - /// time the application has been running - inline float time() const { return application_time; } + /// the current application time, in microseconds + inline unsigned long timestamp() const { return application_timestamp; } + /// the current application time, in seconds + float time() const { return ((float)(timestamp()) / 1000.0f); } + /// true if the core is connected to a running game interface inline bool connected() const { return (application_game && application_game->running()); } @@ -88,7 +91,7 @@ public: protected: /// run a core frame - virtual void frame(float seconds); + virtual void frame(unsigned long timestamp); /// load cvar config void load_config(); @@ -104,7 +107,7 @@ protected: private: /// time the core has been running - float application_time; + unsigned long application_timestamp; GameInterface *application_game; static Application *application_instance; |