.NET Thread.Sleep() is randomly imprecise

前端 未结 7 1903
故里飘歌
故里飘歌 2021-01-20 01:34

In my .NET application I have to replay a series of sensor events. So I created a thread that fires these events (usually about every 1 - 4 millisecond). I implemented a loo

相关标签:
7条回答
  • 2021-01-20 02:19

    Your program is not guaranteed to be the sole user of a CPU.

    Other processes get slices of the CPU - Thread.Sleep will make a best attempt to resume after the timeout, but if the CPU is busy, it has to wait.

    0 讨论(0)
提交回复
热议问题