CalculateAdaptiveDelay() public method

public CalculateAdaptiveDelay ( ) : int
return int
 public void Timeout_100()
 {
     // Arrange
     var timeoutManager = new TimeoutManager(100);
     
     // Act
     var result = timeoutManager.CalculateAdaptiveDelay();
     
     // Assert
     MbUnit.Framework.Assert.AreEqual(Preferences.OnSleepDelay, result);
     Xunit.Assert.Equal(Preferences.OnSleepDelay, result);
 }
 public void Timeout_5000()
 {
     // Arrange
     var timeoutManager = new TimeoutManager(5000);
     
     // Act
     var result = timeoutManager.CalculateAdaptiveDelay();
     
     // Assert
     MbUnit.Framework.Assert.AreEqual(250, result);
     Xunit.Assert.Equal(250, result);
 }
Example #3
0
 public virtual void OnSleepHook()
 {
     var timeoutManager = new TimeoutManager(Timeout);
     System.Threading.Thread.Sleep(timeoutManager.CalculateAdaptiveDelay());
 }
Example #4
0
        public virtual void OnSleepHook()
        {
            var timeoutManager = new TimeoutManager(Timeout);

            System.Threading.Thread.Sleep(timeoutManager.CalculateAdaptiveDelay());
        }