SpeedSleep.cs 642 B

1234567891011121314151617181920212223242526
  1. using SHJX.Service.Control.Common.Assets;
  2. namespace SHJX.Service.Control.Extends
  3. {
  4. public static class SpeedSleep
  5. {
  6. public static int Calculation(string value)
  7. {
  8. var speed = DataManagerInstance.GetSpeed(value);
  9. int sleepValue = speed.Speed switch
  10. {
  11. <= 1 => 1000,
  12. 2 => 500,
  13. 3 => 340,
  14. 4 => 260,
  15. 5 => 200,
  16. 6 => 170,
  17. 7 => 145,
  18. 8 => 130,
  19. 9 => 125,
  20. > 9 => 120
  21. };
  22. return sleepValue;
  23. }
  24. }
  25. }