Fumofumotris/source/fumoengine/fumocommon.c
Julia 1dcea1a2cf jjdjd
a
2024-04-30 16:41:31 -05:00

24 lines
374 B
C

#include "fumocommon.h"
#include <time.h>
size_t MinSize(size_t a, size_t b)
{
return a < b ? a : b;
}
Time TimeNow()
{
struct timespec ts;
timespec_get(&ts, TIME_UTC);
return ts.tv_nsec + ts.tv_sec * ONE_E_9;
}
double TimeNowD()
{
struct timespec ts;
timespec_get(&ts, TIME_UTC);
return ts.tv_sec + (double)ts.tv_nsec / 1000000000.0;
}