下面的函数 系统.Threading.Thread.Sleep(); 以毫秒为单位延迟线程,并以整数值作为参数。是否有微秒级线程延迟的任何方法。或者 sleep 功能可以采用浮点值吗? 谢谢
最佳答案
没有。引用来自 85122 的 Will Dean
you can't meaningfully 'sleep' (i.e. relinquish your scheduled CPU) for such short periods. If you want to delay for some short time, then you need to spin, repeatedly checking a suitably high-resolution timer (e.g. the 'performance timer') and hoping that something of high priority doesn't pre-empt you anyway.
关于c# - C# 中的时间延迟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/903688/