摘要: 原来Sleep()的精度根本不够毫秒级别啊,弄了好长时间。最终还是用QueryPerformanceCounter()写了延时程序,把自己的一点小成果记下来吧呵呵。很简单的原理,可是还是搞了半天。希望有大虾们指点指点。 //调用API函数 [DllImport("kernel32.dll")] extern static short QueryPerformanceCounter(ref long x); [DllImport("kernel32.dll")] extern static short QueryPerformanceFrequency(ref long x); //定义延迟函 阅读全文