From 40d2ec54e5c28de1d3d995e70c6bc89f0b309a71 Mon Sep 17 00:00:00 2001 From: rodolphito Date: Wed, 27 Mar 2019 11:06:42 -0700 Subject: [PATCH] This method seems pretty redundant, could just be called directly. (#677) --- Assets/Mirror/Runtime/NetworkTime.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Assets/Mirror/Runtime/NetworkTime.cs b/Assets/Mirror/Runtime/NetworkTime.cs index e8c5f868a..2ce657b18 100644 --- a/Assets/Mirror/Runtime/NetworkTime.cs +++ b/Assets/Mirror/Runtime/NetworkTime.cs @@ -13,7 +13,7 @@ public static class NetworkTime // average out the last few results from Ping public static int PingWindowSize = 10; - internal static double lastPingTime; + static double lastPingTime; // Date and time when the application started @@ -45,16 +45,11 @@ public static void Reset() offsetMax = double.MaxValue; } - internal static NetworkPingMessage GetPing() - { - return new NetworkPingMessage(LocalTime()); - } - internal static void UpdateClient() { if (Time.time - lastPingTime >= PingFrequency) { - NetworkPingMessage pingMessage = GetPing(); + NetworkPingMessage pingMessage = new NetworkPingMessage(LocalTime()); NetworkClient.Send(pingMessage); lastPingTime = Time.time; }