- rename I_FPSTime function.

- now that the frame buffer stores its render time, the 'ms' return from I_GetTimeFrac is not needed anymore, we may just as well use the globally stored value instead.

The only feature this value was ever used for was texture warping.
This commit is contained in:
Christoph Oelckers 2017-11-13 00:54:32 +01:00
commit 0323f54384
14 changed files with 31 additions and 33 deletions

View file

@ -120,14 +120,14 @@ int I_WaitForTic(int prevtic)
return time;
}
uint64_t I_FPSTimeNS()
uint64_t I_nsTime()
{
return GetClockTimeNS();
}
unsigned int I_FPSTime()
unsigned int I_msTime()
{
return NSToMS(I_FPSTimeNS());
return NSToMS(I_nsTime());
}
int I_GetTime()
@ -135,15 +135,12 @@ int I_GetTime()
return NSToTic(CurrentFrameStartTime - FirstFrameStartTime) + 1;
}
double I_GetTimeFrac(uint32_t *ms)
double I_GetTimeFrac()
{
int currentTic = NSToTic(CurrentFrameStartTime - FirstFrameStartTime);
uint64_t ticStartTime = FirstFrameStartTime + TicToNS(currentTic);
uint64_t ticNextTime = FirstFrameStartTime + TicToNS(currentTic + 1);
if (ms)
*ms = currentTic + 1;
return (CurrentFrameStartTime - ticStartTime) / (double)(ticNextTime - ticStartTime);
}