diff options
author | Marcus Comstedt | 2003-03-02 20:17:21 +0000 |
---|---|---|
committer | Marcus Comstedt | 2003-03-02 20:17:21 +0000 |
commit | a29fb89e53741af9b09f48c87d51e048c789339e (patch) | |
tree | 2f9347af295e5d06bc42b0148bc329c29d957467 /backends/dc/time.cpp | |
parent | 738be5adeb369665912cf81df69669e385e7d724 (diff) | |
download | scummvm-rg350-a29fb89e53741af9b09f48c87d51e048c789339e.tar.gz scummvm-rg350-a29fb89e53741af9b09f48c87d51e048c789339e.tar.bz2 scummvm-rg350-a29fb89e53741af9b09f48c87d51e048c789339e.zip |
Timer implemented.
svn-id: r6667
Diffstat (limited to 'backends/dc/time.cpp')
-rw-r--r-- | backends/dc/time.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backends/dc/time.cpp b/backends/dc/time.cpp index 9892e0c621..453b62fdc5 100644 --- a/backends/dc/time.cpp +++ b/backends/dc/time.cpp @@ -53,6 +53,18 @@ void OSystem_Dreamcast::delay_msecs(uint msecs) get_msecs(); } +void OSystem_Dreamcast::set_timer(int timer, int (*callback)(int)) +{ + if (callback != NULL) { + _timer_duration = timer; + _timer_next_expiry = Timer() + USEC_TO_TIMER(1000*timer); + _timer_callback = callback; + _timer_active = true; + } else { + _timer_active = false; + } +} + /* void waitForTimer(Scumm *s, int time) |