/// <summary> /// Sleeps during the specified time. /// </summary> /// <param name="time">The time, in milliseconds.</param> public static void Sleep(decimal time) { if (time < 0) { return; } if (Board.Current.IsRaspberryPi) { HighResolutionTimer.Sleep(time); } else { Thread.Sleep((int)time); } }
/// <summary> /// Sleeps during the specified time. /// </summary> /// <param name="time">The time.</param> public static void Sleep(TimeSpan time) { if (time.TotalMilliseconds < 0) { return; } if (Board.Current.IsRaspberryPi) { HighResolutionTimer.Sleep(time); } else { Thread.Sleep(time); } }