diff options
Diffstat (limited to 'backends/platform/psp/thread.h')
| -rw-r--r-- | backends/platform/psp/thread.h | 16 |
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 { |
