From 1a28393dabf4f4696bf433ddde52e7a25253c955 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 16 Oct 2008 16:34:15 +0000 Subject: various user interface related updates --- src/core/application.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/core/application.h') 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; -- cgit v1.2.3