From f5ff3a5efaa8a156a643124a8ae48a7bae65e7b6 Mon Sep 17 00:00:00 2001 From: The Arrayser <68914060+TheArrayser@users.noreply.github.com> Date: Tue, 30 Aug 2022 12:56:58 +0200 Subject: [PATCH] =?UTF-8?q?fr=C3=A4ds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System Abstraction/win32/cdb_thread.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 System Abstraction/win32/cdb_thread.c diff --git a/System Abstraction/win32/cdb_thread.c b/System Abstraction/win32/cdb_thread.c new file mode 100644 index 0000000..a763569 --- /dev/null +++ b/System Abstraction/win32/cdb_thread.c @@ -0,0 +1,18 @@ +#include "../cdb_sustem.h" +#include + +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); +} \ No newline at end of file