Removal and Replacement of the CryTimer (gEnv->pTimer) (#5409)
Replaced and removed the CryTimer (gEnv->pTimer). The new TimeSystem is a merger of the current time functionality found in the engine.
* Rename TimeSystemComponent.h/.cpp to TimeSystem.h/.cpp
* Adding New TimeSystem
* remove old timer cvars
* small improvements to the time system.
- updated parts to use the time conversion functions.
- in AdvanceTickDeltaTimes applying t_simulationTickScale is now uses doubles instead of floats.
* Replace gEnv->pTimer / ITimer usages with TimeSystem
* Updating usages of AZ::TimeMs{ 0 } and AZ::TimeUs{ 0 } to AZ::Time::ZeroTimeMs and AZ::Time::ZeroTimeUs
* red code the CryTimer
* using TimeUs instead of TimeMs is some cases + updating usages of old cvars to new
Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,7 @@ namespace AzNetworking
|
||||
{
|
||||
const uint32_t sampleAtom = 1 - m_activeAtom;
|
||||
|
||||
if (m_atoms[sampleAtom].m_timeAccumulatorMs == AZ::TimeMs{0})
|
||||
if (m_atoms[sampleAtom].m_timeAccumulatorMs == AZ::Time::ZeroTimeMs)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace AzNetworking
|
||||
{
|
||||
DatarateAtom() = default;
|
||||
|
||||
AZ::TimeMs m_timeAccumulatorMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_timeAccumulatorMs = AZ::Time::ZeroTimeMs;
|
||||
uint32_t m_bytesTransmitted = 0;
|
||||
uint32_t m_packetsSent = 0;
|
||||
uint32_t m_packetsLost = 0;
|
||||
@@ -78,7 +78,7 @@ namespace AzNetworking
|
||||
ConnectionPacketEntry(PacketId packetId, AZ::TimeMs sendTimeMs);
|
||||
|
||||
PacketId m_packetId = InvalidPacketId;
|
||||
AZ::TimeMs m_sendTimeMs = AZ::TimeMs{0};
|
||||
AZ::TimeMs m_sendTimeMs = AZ::Time::ZeroTimeMs;
|
||||
};
|
||||
|
||||
//! @class ConnectionComputeRtt
|
||||
|
||||
@@ -28,8 +28,8 @@ namespace AzNetworking
|
||||
ConnectionQuality(int32_t lossPercentage, AZ::TimeMs latencyMs, AZ::TimeMs varianceMs);
|
||||
|
||||
int32_t m_lossPercentage = 0;
|
||||
AZ::TimeMs m_latencyMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_varianceMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_latencyMs = AZ::Time::ZeroTimeMs;
|
||||
AZ::TimeMs m_varianceMs = AZ::Time::ZeroTimeMs;
|
||||
};
|
||||
|
||||
enum class TrustZone
|
||||
|
||||
Reference in New Issue
Block a user