public TimedHeartBeat(AmqpConnection connection, uint local, uint remote)
{
Fx.Assert(local > 0 || remote > 0, "At least one idle timeout must be set");
this.connection = connection;
this.lastReceiveTime = this.lastSendTime = DateTime.UtcNow;
this.localInterval = local;
this.remoteInterval = remote < uint.MaxValue ? remote * 7 / 8 : uint.MaxValue;
this.heartBeatTimer = new Timer(OnHeartBeatTimer, this, Timeout.Infinite, Timeout.Infinite);
this.SetTimer(this.lastSendTime);
}