SuperMarioOdysseyOnline/source/server/DeltaTime.cpp

11 lines
309 B
C++
Raw Normal View History

2022-06-16 21:33:18 +00:00
#include "server/DeltaTime.hpp"
sead::TickTime Time::prevTime;
sead::TickSpan Time::deltaSpan;
float Time::deltaTime;
void Time::calcTime() {
Time::deltaSpan = Time::prevTime.diffToNow();
Time::prevTime.setNow();
Time::deltaTime = fabsf((double)Time::deltaSpan.toNanoSeconds() / 1000000000.0);
}