mirror of
https://github.com/CraftyBoss/SuperMarioOdysseyOnline.git
synced 2024-11-28 14:13:04 +00:00
11 lines
No EOL
309 B
C++
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);
|
|
} |