Fumofumotris/source/game/gametime.c
Julia e856594741 hi
uikhj
2024-04-16 17:14:53 -05:00

21 lines
324 B
C

#include <time.h>
#include <stdbool.h>
#ifdef _WIN32
#include "win.h"
#endif
struct timespec TimeNow()
{
struct timespec ts;
timespec_get(&ts, TIME_UTC);
return ts;
}
double TimeNowDouble()
{
struct timespec ts;
timespec_get(&ts, TIME_UTC);
return ts.tv_sec + (double)ts.tv_nsec / 1000000000.0;
}