2019-11-03 17:19:29 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2020-04-11 21:43:29 +00:00
|
|
|
extern int GameTicRate;
|
|
|
|
|
|
|
|
// Called by D_DoomLoop, sets the time for the current frame
|
|
|
|
void I_SetFrameTime();
|
|
|
|
|
|
|
|
// Called by D_DoomLoop, returns current time in tics.
|
|
|
|
int I_GetTime();
|
|
|
|
|
|
|
|
double I_GetTimeFrac();
|
|
|
|
|
|
|
|
// like I_GetTime, except it waits for a new tic before returning
|
|
|
|
int I_WaitForTic(int);
|
|
|
|
|
|
|
|
// Freezes tic counting temporarily. While frozen, calls to I_GetTime()
|
|
|
|
// will always return the same value.
|
|
|
|
// You must also not call I_WaitForTic() while freezing time, since the
|
|
|
|
// tic will never arrive (unless it's the current one).
|
|
|
|
void I_FreezeTime(bool frozen);
|
|
|
|
|
2019-11-03 17:19:29 +00:00
|
|
|
// [RH] Returns millisecond-accurate time
|
|
|
|
uint64_t I_msTime();
|
|
|
|
|
2020-06-20 09:55:30 +00:00
|
|
|
// [RH] Returns nanosecond-accurate time in milliseconds
|
|
|
|
double I_msTimeF(void);
|
|
|
|
|
2020-04-11 21:43:29 +00:00
|
|
|
// [SP] Returns millisecond-accurate time from start
|
|
|
|
uint64_t I_msTimeFS();
|
|
|
|
|
2019-11-03 17:19:29 +00:00
|
|
|
// Nanosecond-accurate time
|
|
|
|
uint64_t I_nsTime();
|