aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2006-06-24 09:34:49 +0000
committerMax Horn2006-06-24 09:34:49 +0000
commit75628fe9d7fa636da792d278b36396c3934ddf0e (patch)
tree2b206b49fcea8d913ddd0bc26347026242b1fce5 /common
parentff1566754407dea6b44e7687634850475aa2ccf2 (diff)
downloadscummvm-rg350-75628fe9d7fa636da792d278b36396c3934ddf0e.tar.gz
scummvm-rg350-75628fe9d7fa636da792d278b36396c3934ddf0e.tar.bz2
scummvm-rg350-75628fe9d7fa636da792d278b36396c3934ddf0e.zip
Renamed class Timer to TimerManager (the old name was somewhat incorrect/confusing)
svn-id: r23278
Diffstat (limited to 'common')
-rw-r--r--common/timer.cpp16
-rw-r--r--common/timer.h8
2 files changed, 12 insertions, 12 deletions
diff --git a/common/timer.cpp b/common/timer.cpp
index 0183cacd78..8ac033cf03 100644
--- a/common/timer.cpp
+++ b/common/timer.cpp
@@ -29,9 +29,9 @@
namespace Common {
-Timer *g_timer = NULL;
+TimerManager *g_timer = NULL;
-Timer::Timer(OSystem *system) :
+TimerManager::TimerManager(OSystem *system) :
_system(system),
_timerHandler(0),
_lastTime(0) {
@@ -51,10 +51,10 @@ Timer::Timer(OSystem *system) :
}
-Timer::~Timer() {
+TimerManager::~TimerManager() {
// Remove the timer callback.
// Note: backends *must* gurantee that after this method call returns,
- // the handler is not in use anymore; else race condtions could occurs.
+ // the handler is not in use anymore; else race condtions could occur.
_system->setTimerCallback(0, 0);
{
@@ -67,13 +67,13 @@ Timer::~Timer() {
}
}
-int Timer::timer_handler(int t) {
+int TimerManager::timer_handler(int t) {
if (g_timer)
return g_timer->handler(t);
return 0;
}
-int Timer::handler(int t) {
+int TimerManager::handler(int t) {
StackLock lock(_mutex);
uint32 interval, l;
@@ -97,7 +97,7 @@ int Timer::handler(int t) {
return t;
}
-bool Timer::installTimerProc(TimerProc procedure, int32 interval, void *refCon) {
+bool TimerManager::installTimerProc(TimerProc procedure, int32 interval, void *refCon) {
assert(interval > 0);
StackLock lock(_mutex);
@@ -115,7 +115,7 @@ bool Timer::installTimerProc(TimerProc procedure, int32 interval, void *refCon)
return false;
}
-void Timer::removeTimerProc(TimerProc procedure) {
+void TimerManager::removeTimerProc(TimerProc procedure) {
StackLock lock(_mutex);
for (int l = 0; l < MAX_TIMERS; l++) {
diff --git a/common/timer.h b/common/timer.h
index f414895060..e0023cd2aa 100644
--- a/common/timer.h
+++ b/common/timer.h
@@ -36,7 +36,7 @@ class OSystem;
namespace Common {
-class Timer {
+class TimerManager {
public:
typedef void (*TimerProc)(void *refCon);
@@ -55,8 +55,8 @@ private:
} _timerSlots[MAX_TIMERS];
public:
- Timer(OSystem *system);
- ~Timer();
+ TimerManager(OSystem *system);
+ ~TimerManager();
/**
* Install a new timer callback. It will from now be called every interval microseconds.
@@ -82,7 +82,7 @@ protected:
int handler(int t);
};
-extern Timer *g_timer;
+extern TimerManager *g_timer;
} // End of namespace Common