uint32 FTestThread::Run()
{
uint64 tLastStampedCycle = FPlatformTime::Cycles64()
while(bStop)
{
uint64 tCurrentTimeCycle = FPlatformTime::Cycles64();
const double DeltaTime = FPlatformTime::ToMilliseconds64(tCurrentTimeCycle - tLastStampedCycle ) * 1000.0;
tLastStampedCycle = tCurrentTimeCycle;
FPlatformProcess::Sleep(0.003f);
}
}
This is async-task operation (used FRunnable).
This code keeps giving me inaccurate Deltatime.
The actual time differs by more than 10 seconds.
I would like to know what the problem is