What is the maximum precision of the Timer in .NET?

后端 未结 6 2058
北荒
北荒 2020-12-20 14:12

I\'m wondering what the precision of the Timer class is in System.Timers, because it\'s a double (which would seem to indicate that you can have fractions of milliseconds).

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-20 14:47

    You can find this out easily for yourself by performing a loop that constantly samples the resulting time duration and check on what granularity it steps.

提交回复
热议问题