diff --git a/Assets/Scripts/Stats/NetStats.cs b/Assets/Scripts/Stats/NetStats.cs index b20c3b80..87b1c190 100644 --- a/Assets/Scripts/Stats/NetStats.cs +++ b/Assets/Scripts/Stats/NetStats.cs @@ -21,6 +21,7 @@ namespace SanAndreasUnity.Stats AddTimeSpan(sb, "Network time", NetworkTime.time); AddTimeSpan(sb, "Local network time", NetworkTime.localTime); + AddTimeSpan(sb, "Diff between network times", NetworkTime.time - NetworkTime.localTime, true); if (NetStatus.IsServer) { @@ -45,9 +46,9 @@ namespace SanAndreasUnity.Stats sb.AppendLine($"Num spawned network objects: {NetManager.NumSpawnedNetworkObjects}"); } - private static void AddTimeSpan(System.Text.StringBuilder sb, string text, double seconds) + private static void AddTimeSpan(System.Text.StringBuilder sb, string text, double seconds, bool useMilliseconds = false) { - sb.AppendLine($"{text}: {F.FormatElapsedTime(seconds)}"); + sb.AppendLine($"{text}: {F.FormatElapsedTime(seconds, useMilliseconds)}"); } private static void AddAsMs(System.Text.StringBuilder sb, string text, double seconds)