using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Sog; using Google.Protobuf.WellKnownTypes; using Google.Protobuf; namespace SMConsole { public static class SMPingSvc { public static long lastPingTimeMs; public static void Update(long tMs) { if(tMs - lastPingTimeMs < 30000) { return; } lastPingTimeMs = tMs; if(SMConsoleNet.Instance.IsConnected() == false) { return; } SMPing ping = new SMPing(); SMConsoleNet.Instance.SendMsgToCenter(ping, SMMsgID.Ping); } } }