1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 05:53:02 +01:00

Close #11437: Migrate old platform methods

This commit is contained in:
Michael Steenbeek
2022-02-18 21:57:00 +01:00
committed by GitHub
parent b424682934
commit 5edc561715
81 changed files with 613 additions and 793 deletions

View File

@@ -13,7 +13,7 @@
# include "../core/String.hpp"
# include "../localisation/Localisation.h"
# include "../platform/platform.h"
# include "../platform/Platform.h"
# include "Socket.h"
# include "network.h"
@@ -83,7 +83,7 @@ NetworkReadPacket NetworkConnection::ReadPacket()
if (InboundPacket.Data.size() == header.Size)
{
// Received complete packet.
_lastPacketTime = platform_get_ticks();
_lastPacketTime = Platform::GetTicks();
RecordPacketStats(InboundPacket, false);
@@ -171,13 +171,13 @@ void NetworkConnection::SendQueuedPackets()
void NetworkConnection::ResetLastPacketTime() noexcept
{
_lastPacketTime = platform_get_ticks();
_lastPacketTime = Platform::GetTicks();
}
bool NetworkConnection::ReceivedPacketRecently() const noexcept
{
# ifndef DEBUG
if (platform_get_ticks() > _lastPacketTime + 7000)
if (Platform::GetTicks() > _lastPacketTime + 7000)
{
return false;
}