diff --git a/Src/OSD/SDL/Thread.cpp b/Src/OSD/SDL/Thread.cpp index 7a43e01..5a61f20 100755 --- a/Src/OSD/SDL/Thread.cpp +++ b/Src/OSD/SDL/Thread.cpp @@ -35,6 +35,16 @@ #include #endif +void CThread::Sleep(UINT32 ms) +{ + SDL_Delay(ms); +} + +UINT32 CThread::GetTicks() +{ + return SDL_GetTicks(); +} + CThread *CThread::CreateThread(ThreadStart start, void *startParam) { SDL_Thread *impl = SDL_CreateThread(start, startParam); diff --git a/Src/OSD/Thread.h b/Src/OSD/Thread.h index a8900d4..d3ca28c 100755 --- a/Src/OSD/Thread.h +++ b/Src/OSD/Thread.h @@ -48,6 +48,20 @@ private: public: /* + * Sleep + * + * Sleeps for specified number of milliseconds. + */ + static void Sleep(UINT32 ms); + + /* + * GetTicks + * + * Gets number of millseconds since beginning of program. + */ + static UINT32 GetTicks(); + + /* * CreateThread * * Creates a new thread with the given ThreadStart callback and start parameter. The thread starts running immediately.