Add time functionality

This commit is contained in:
Fierelier 2024-08-13 05:08:58 +02:00
parent ab5f142e34
commit 225b3b41ec
2 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#include <stdint.h> #include <stdint.h>
#include <SDL/SDL.h> #include <SDL/SDL.h>
#include "graphics.c" #include "graphics.c"
#include "time.c"
#include "events.c" #include "events.c"
unigi_type_error unigi_init() { unigi_type_error unigi_init() {

8
src/time.c Normal file
View File

@ -0,0 +1,8 @@
unigi_type_time_scale unigi_time_clocks_per_sec = 1000;
unigi_type_time_span unigi_time_get() {
return (unigi_type_time_span)SDL_GetTicks();
}
void unigi_time_sleep(unigi_type_time_span t) {
SDL_Delay((unigi_type_time_span)t);
}