public bool CheckAckCount() { if (sendCount == 0) { return(true); } int currentTime = UXUtil.GetUnixtimestamp(); int gab = currentTime - sendTime; if (gab < ackTimer.Interval / 1000) { return(true); } sendCount = 0; return(false); }
void SendAckTimer(object sender, ElapsedEventArgs e) { if (sendCount != 0) { return; } if (roomConnect == null) { return; } sendTime = UXUtil.GetUnixtimestamp(); sendCount++; string sendString = "{\"" + commandTitle + "\":\"ack\",\"time\":" + sendTime.ToString(); sendString += "}" + UXConnectController.DATA_DELIMITER; roomConnect.Send(sendString); }