public static async ETTask Send(this WebSocketBenchmarkComponent self, Session session, int j) { try { await session.Call(new C2R_Ping()); ++self.k; if (self.k % 10000 != 0) { return; } long time2 = TimeHelper.ClientNow(); long time = time2 - self.time1; self.time1 = time2; Log.Info($"Benchmark k: {self.k} 每1W次耗时: {time} ms {session.Network.Count}"); } catch (Exception e) { Log.Error(e); } }
public long Now() { return(TimeHelper.ClientNow() - this.syncClientTime + syncTime); }