SleepTool.cs 948 B

123456789101112131415161718192021222324252627282930313233
  1. //************************************************************************
  2. // author: yuzhengyang
  3. // date: 2018.3.27 - 2018.6.3
  4. // desc: 工具描述
  5. // Copyright (c) yuzhengyang. All rights reserved.
  6. //************************************************************************
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Diagnostics;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading;
  13. namespace Azylee.Core.ThreadUtils.SleepUtils
  14. {
  15. public static class SleepTool
  16. {
  17. /// <summary>
  18. /// Sleep(单位:秒)
  19. /// </summary>
  20. public static void Zs(short s = 1)
  21. {
  22. try { Thread.Sleep(s * 1000); } catch { }
  23. }
  24. /// <summary>
  25. /// Sleep(单位:分)
  26. /// </summary>
  27. public static void Zm(short m = 1)
  28. {
  29. try { Thread.Sleep(m * 60 * 1000); } catch { }
  30. }
  31. }
  32. }