mirror of
https://github.com/CraftyBoss/SuperMarioOdysseyOnline.git
synced 2024-11-17 17:05:09 +00:00
11 lines
309 B
C++
11 lines
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);
|
||
|
}
|