SuperMarioOdysseyOnline/source/server/DeltaTime.cpp
2022-06-16 14:33:18 -07:00

11 lines
No EOL
309 B
C++

#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);
}