Adding RTS & DTS mechanism (not working yet)

This commit is contained in:
Marek Kraus
2022-11-09 20:16:08 +01:00
parent 7f69a80f0e
commit 6e036df085
2 changed files with 31 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#ifndef _BLISP_UTIL_H
#define _BLISP_UTIL_H
#ifdef WIN32
#include <windows.h>
#else
#include <time.h>
#endif
static void sleep_ms(int milliseconds){
#ifdef WIN32
Sleep(milliseconds);
#else
struct timespec ts;
ts.tv_sec = milliseconds / 1000;
ts.tv_nsec = (milliseconds % 1000) * 1000000;
nanosleep(&ts, NULL);
#endif
}
#endif