diff options
Diffstat (limited to 'src/core/gameserver.h')
-rw-r--r-- | src/core/gameserver.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/gameserver.h b/src/core/gameserver.h index ab2bf92..2e1aa2a 100644 --- a/src/core/gameserver.h +++ b/src/core/gameserver.h @@ -7,6 +7,7 @@ #ifndef __INCLUDED_CORE_GAMESERVER_H__ #define __INCLUDED_CORE_GAMESERVER_H__ +#include "sys/timer.h" #include "core/gameinterface.h" #include "core/message.h" #include "core/module.h" @@ -41,7 +42,12 @@ public: void player_disconnect(Player *player); /// run a game server time frame - void frame(unsigned long timestamp); + virtual void frame(const unsigned long timestamp); + + /// server timer + inline const sys::Timer & timer() { + return server_timer; + } /// a player sends a chat message to the global chat channel void shout(Player *player, std::string const &args); @@ -70,11 +76,6 @@ public: /// a player sends a command to the game server void exec(Player *player, std::string const &cmdline); - /// time the server was started - inline const unsigned long startup() const { - return server_startup; - } - /// request info record with id virtual Info *request_info(const unsigned int id); @@ -99,7 +100,7 @@ private: unsigned int server_maxplayerid; unsigned long server_previoustime; - unsigned long server_startup; + sys::Timer server_timer; }; inline GameServer *server() |