diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2006-04-30 03:57:58 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2006-04-30 03:57:58 +0000 |
commit | ecc2253758c536753036ae4ab5ed5e7b1d891c8d (patch) | |
tree | 1aa51907f1e8991e270c23af9accf65de756bc60 /src/main.cpp | |
parent | 9ebb4e544c221ceea0d2bec7a105e203a6b41fc5 (diff) | |
download | manaserv-ecc2253758c536753036ae4ab5ed5e7b1d891c8d.tar.gz manaserv-ecc2253758c536753036ae4ab5ed5e7b1d891c8d.tar.bz2 manaserv-ecc2253758c536753036ae4ab5ed5e7b1d891c8d.tar.xz manaserv-ecc2253758c536753036ae4ab5ed5e7b1d891c8d.zip |
fixed some problems of the timer class
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 951d9b43..a0922202 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -334,6 +334,8 @@ void parseOptions(int argc, char *argv[]) */ int main(int argc, char *argv[]) { + int elapsedWorldTicks; + LOG_INFO("The Mana World Server v" << PACKAGE_VERSION, 0) // Parse Command Line Options @@ -398,8 +400,14 @@ int main(int argc, char *argv[]) worldTimer.start(); while (running) { - if (worldTimer.poll()) { - worldTime++; + elapsedWorldTicks = worldTimer.poll(); + if (elapsedWorldTicks > 0) { + worldTime += elapsedWorldTicks; + + if (elapsedWorldTicks > 1) + { + LOG_WARN(elapsedWorldTicks -1 <<" World Tick(s) skipped because of insufficient time. please buy a faster machine ;-)", 0); + }; // Print world time at 10 second intervals to show we're alive if (worldTime % 100 == 0) { |