[*] Initial commit

This commit is contained in:
Lorenzo Cogotti
2021-06-07 16:55:13 +02:00
commit b0ef4dd774
117 changed files with 29737 additions and 0 deletions

25
lonetix/sys/sys_unix.c Executable file
View File

@ -0,0 +1,25 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
/**
* \file sys/sys_unix.c
*
* General system specific functionality implementation over Unix.
*
* \copyright The DoubleFourteen Code Forge (C) All Rights Reserved
* \author Lorenzo Cogotti
*/
#include "sys/sys_local.h"
#include <time.h>
void Sys_SleepMillis(Uint32 millis)
{
struct timespec ts;
ts.tv_sec = millis / 1000;
ts.tv_nsec = (millis % 1000) * 1000000uLL;
int res;
do res = nanosleep(&ts, &ts); while (res != 0); // res != 0 -> EINTR
}