fräds
This commit is contained in:
parent
765d011630
commit
f5ff3a5efa
18
System Abstraction/win32/cdb_thread.c
Normal file
18
System Abstraction/win32/cdb_thread.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include "../cdb_sustem.h"
|
||||
#include <windows.h>
|
||||
|
||||
DWORD WINAPI threadProc(sus_threadProc proc){
|
||||
return proc();
|
||||
}
|
||||
|
||||
sus_Bool sus_threadNew(sus_threadProc proc){
|
||||
if(CreateThread(NULL, 0, threadProc, proc, 0, NULL) == NULL){
|
||||
return sus_False;
|
||||
}else{
|
||||
return sus_True;
|
||||
}
|
||||
}
|
||||
|
||||
void sus_threadSleep(unsigned long seconds){
|
||||
Sleep(seconds * 1000);
|
||||
}
|
Loading…
Reference in New Issue
Block a user