better fix for VC6 "can't cast u64 to double"
This commit is contained in:
@@ -45,8 +45,10 @@ float RageTimer::GetTimeSinceStart( bool bAccurate )
|
|||||||
{
|
{
|
||||||
uint64_t usecs = GetTime( bAccurate );
|
uint64_t usecs = GetTime( bAccurate );
|
||||||
usecs -= g_iStartTime;
|
usecs -= g_iStartTime;
|
||||||
uint32_t ret = usecs / 1000000;
|
// HACK: VC6 can't cast u64 to a double, but it can cast a i64 to a double.
|
||||||
return (float)ret;
|
// We can afford to lose one bit of precision since these numbers will
|
||||||
|
// never overflow a 64 int.
|
||||||
|
return (int64_t)usecs / 1000000.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RageTimer::Touch()
|
void RageTimer::Touch()
|
||||||
|
|||||||
Reference in New Issue
Block a user