gpt4 book ai didi

c# - DateTime.Now 检索速度

转载 作者:可可西里 更新时间:2023-11-01 08:54:01 26 4
gpt4 key购买 nike

这个语句是否有可能返回 true

DateTime.Now == DateTime.Now

一个非常快的机器可以为这条语句返回 true 吗,我在几台机器上试过,它总是 false ?

最佳答案

是的。

The resolution of this property depends on the system timer, which is approximately 15 milliseconds on Windows systems.As a result, repeated calls to the Now property in a short time interval, such as in a loop, may return the same value.

来源:https://msdn.microsoft.com/en-us/library/system.datetime.now(v=vs.110).aspx

关于c# - DateTime.Now 检索速度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40898557/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com