diff options
author | Max Horn | 2006-10-26 07:25:25 +0000 |
---|---|---|
committer | Max Horn | 2006-10-26 07:25:25 +0000 |
commit | 28266579320d27acf192bab1cb22c76d67b33566 (patch) | |
tree | 1a5a6eec5a6f348d1d2acdef39663732686348a8 | |
parent | 304c10261361a26a11d24e8c2bc9ca6d9b36a8ef (diff) | |
download | scummvm-rg350-28266579320d27acf192bab1cb22c76d67b33566.tar.gz scummvm-rg350-28266579320d27acf192bab1cb22c76d67b33566.tar.bz2 scummvm-rg350-28266579320d27acf192bab1cb22c76d67b33566.zip |
Increase timer accuracy again
svn-id: r24518
-rw-r--r-- | backends/timer/default/default-timer.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/backends/timer/default/default-timer.cpp b/backends/timer/default/default-timer.cpp index f1209dd870..6688ce0a03 100644 --- a/backends/timer/default/default-timer.cpp +++ b/backends/timer/default/default-timer.cpp @@ -80,7 +80,7 @@ DefaultTimerManager::~DefaultTimerManager() { void DefaultTimerManager::handler() { Common::StackLock lock(_mutex); - const int32 curTime = g_system->getMillis(); + const int32 curTime = g_system->getMillis() * 1000; // Repeat as long as there is a TimerSlot that is scheduled to fire. TimerSlot *slot = _head->next; @@ -109,13 +109,11 @@ bool DefaultTimerManager::installTimerProc(TimerProc callback, int32 interval, v Common::StackLock lock(_mutex); - interval /= 1000; - TimerSlot *slot = new TimerSlot; slot->callback = callback; slot->refCon = refCon; slot->interval = interval; - slot->nextFireTime = g_system->getMillis() + interval; + slot->nextFireTime = g_system->getMillis() * 1000 + interval; slot->next = 0; insertPrioQueue(_head, slot); |