private void CalculateBandwidth(int transmittedBytes) {
this.bytesTransmittedSinceLastSecond += transmittedBytes;
var diff = DateTime.Now - this.start;
if (diff.Seconds >= 1) {
this.BitsPerSecond = CalcBitsPerSecond(this.start, DateTime.Now, this.bytesTransmittedSinceLastSecond);
this.bytesTransmittedSinceLastSecond = 0;
this.start += diff;
this.blockingDetectionTimer.Stop();
this.blockingDetectionTimer.Start();
}
}
}