123456789101112131415161718192021 |
- using System.Runtime.InteropServices;
- namespace ET
- {
- public static class WinPeriod
- {
-
- [DllImport("winmm")]
- private static extern void timeBeginPeriod(int t);
-
-
- public static void Init()
- {
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- timeBeginPeriod(1);
- }
- }
- }
- }
|