10#define TIME_PRI PRIi64
12#define NT_CYCLE_PERIODS ( 5000 )
13#define NT_PERIOD_SECONDS ( 10000 )
15typedef int64_t ntime_t;
25void ntime_getR(
int *cycles,
int *periods,
int *seconds,
double *rem );
36void ntime_setR(
int cycles,
int periods,
int seconds,
double rem );
void ntime_set(ntime_t t)
Sets the time absolutely, does NOT generate an event, used at init.
ntime_t ntime_create(int scu, int stp, int stu)
Creates a time structure.
ntime_t ntime_get(void)
Gets the current time.
char * ntime_pretty(ntime_t t, int d)
Gets the time in a pretty human readable format.
int ntime_getSeconds(ntime_t t)
Gets the seconds of a time.
void ntime_refresh(void)
Checks to see if ntime has any hooks pending to run.
void ntime_inc(ntime_t t)
Sets the time relatively.
void ntime_getR(int *cycles, int *periods, int *seconds, double *rem)
Gets the current time broken into individual components.
void ntime_prettyBuf(char *str, int max, ntime_t t, int d)
Gets the time in a pretty human readable format filling a preset buffer.
void ntime_update(double dt)
Updatse the time based on realtime.
void ntime_allowUpdate(int enable)
Allows the time to update when the game is updating.
int ntime_getCycles(ntime_t t)
Gets the cycles of a time.
void ntime_setR(int cycles, int periods, int seconds, double rem)
Loads time including remainder.
int ntime_getPeriods(ntime_t t)
Gets the periods of a time.
double ntime_getRemainder(ntime_t t)
Gets the remainder.
double ntime_convertSeconds(ntime_t t)
Converts the time to seconds.
void ntime_incLagged(ntime_t t)
Sets the time relatively.