Add time functionality
This commit is contained in:
parent
ab5f142e34
commit
225b3b41ec
@ -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
8
src/time.c
Normal 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);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user