aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/psp/thread.h
diff options
context:
space:
mode:
authorAlejandro Marzini2010-06-08 03:31:27 +0000
committerAlejandro Marzini2010-06-08 03:31:27 +0000
commit7ea78b10364d34ae607a9a1da00e4d42ad691aa1 (patch)
treec16c3d224b2ad1179dbf3e7c54b5c0212b0581a4 /backends/platform/psp/thread.h
parent7e9d54a69a3444f5335b8cf6ecabdeffe2830644 (diff)
parentea2e2053f25c216342c74bb7a74dabc682766720 (diff)
downloadscummvm-rg350-7ea78b10364d34ae607a9a1da00e4d42ad691aa1.tar.gz
scummvm-rg350-7ea78b10364d34ae607a9a1da00e4d42ad691aa1.tar.bz2
scummvm-rg350-7ea78b10364d34ae607a9a1da00e4d42ad691aa1.zip
Merged from trunk.
svn-id: r49499
Diffstat (limited to 'backends/platform/psp/thread.h')
-rw-r--r--backends/platform/psp/thread.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/backends/platform/psp/thread.h b/backends/platform/psp/thread.h
index e83eead68e..380159fa2d 100644
--- a/backends/platform/psp/thread.h
+++ b/backends/platform/psp/thread.h
@@ -32,8 +32,20 @@ class PspThread {
public:
static void delayMillis(uint32 ms);
static void delayMicros(uint32 us);
- static uint32 getMillis();
- static uint32 getMicros();
+};
+
+class PspRtc {
+private:
+ uint32 _startMillis;
+ uint32 _startMicros;
+ uint32 _lastMillis;
+ uint32 _milliOffset; // to prevent looping around of millis
+ bool _looped; // make sure we only loop once
+public:
+ PspRtc() : _startMillis(0), _startMicros(0), _lastMillis(0), _milliOffset(0), _looped(false) { init(); }
+ void init();
+ uint32 getMillis();
+ uint32 getMicros();
};
enum ThreadPriority {