public void InsertSendTime(String ipport, String time) { try { if (IPtoHeartbeat.Contains(ipport)) { Heartbeat temp = (Heartbeat)IPtoHeartbeat[ipport]; temp.SendTime = time; // temp.ReceiveTime = ""; IPtoHeartbeat[ipport] = temp; } else { Heartbeat temp = new Heartbeat(); temp.SendTime = time; temp.ReceiveTime = ""; IPtoHeartbeat.Add(ipport, temp); } } catch (Exception e) { Console.WriteLine(e.ToString()); } }
public void InsertSendTime(String ipport, String time) { if (IPtoHeartbeat.Contains(ipport)) { Heartbeat temp = (Heartbeat)IPtoHeartbeat[ipport]; temp.SendTime = time; // temp.ReceiveTime = ""; IPtoHeartbeat[ipport] = temp; } else { Heartbeat temp = new Heartbeat(); temp.SendTime = time; temp.ReceiveTime = ""; IPtoHeartbeat.Add(ipport, temp); } }