mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-25 23:25:40 +00:00
Added CThread::Sleep && CThread::GetTicks methods
This commit is contained in:
parent
67036014f8
commit
b7242d27e8
|
@ -35,6 +35,16 @@
|
|||
#include <SDL_thread.h>
|
||||
#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);
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue