2022
05-17
05-17
C#精确到纳秒级别的计时器类实现代码
主要用到了win32里面的QueryPerformanceCounter和QueryPerformanceFrequency两个函数文档链接:https://docs.microsoft.com/zh-cn/windows/win32/api/profileapi/nf-profileapi-queryperformancecounterclassNanoSecondTimer{[DllImport("Kernel32.dll")]privatestaticexternboolQueryPerformanceCounter(outlonglpPerformanceCount);[DllImport("Kernel32.dll")]privatestaticexter...
继续阅读 >