Desmos | 图形计算器
image.png
/// <summary>
/// 计算接收帧速率,该速率为本地认可的服务器真实平均帧速率
/// </summary>
//public static void CalculateServerRecvFps(this ClientInfo self)
//{
// ClientInfo.c_ServerFpsFrmTimes[self.m_ServerFpsTimePointer] = Time.time;
// //Debug.LogError(">> " + m_ServerFpsTimePointer + " " + c_ServerFpsFrmTimes[m_ServerFpsTimePointer]);
// self.m_ServerFpsTimePointer++;
// if (self.m_ServerFpsTimePointer == ClientInfo.c_ServerFpsFrmcount)
// {
// self.m_ServerFpsTimePointer = 0;
// }
// if (self.serverFpsDataInited)
// {
// self.serverRecvTimeReal = (Time.time - ClientInfo.c_ServerFpsFrmTimes[self.m_ServerFpsTimePointer]) * ClientInfo.c_OneDivServerFpsFrmcount;
// //Debug.LogError(m_ServerFpsTimePointer + " " + c_ServerFpsFrmTimes[m_ServerFpsTimePointer]);
// }
// else
// {
// if (self.m_ServerFpsTimePointer == 0) self.serverFpsDataInited = true;
// self.serverRecvTimeReal = self.ServerSimulateTimeExpect; // 没初始化好
// }
//}
网友评论