mirror of
https://github.com/celisej567/mcpe.git
synced 2026-01-06 22:10:04 +03:00
23 lines
590 B
C++
23 lines
590 B
C++
/********************************************************************
|
|
Minecraft: Pocket Edition - Decompilation Project
|
|
Copyright (C) 2023 iProgramInCpp
|
|
|
|
The following code is licensed under the BSD 1 clause license.
|
|
SPDX-License-Identifier: BSD-1-Clause
|
|
********************************************************************/
|
|
|
|
#include "client/common/Utils.hpp"
|
|
#include "ITurnInput.hpp"
|
|
|
|
float ITurnInput::getDeltaTime()
|
|
{
|
|
if (m_prevTime == -1.0f)
|
|
m_prevTime = getTimeS();
|
|
|
|
float newTime = getTimeS();
|
|
float delta = newTime - m_prevTime;
|
|
m_prevTime = newTime;
|
|
|
|
return delta;
|
|
}
|