Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这让我困惑和困扰了几年,以为我会为此展开讨论。需要考虑的一些问题:
每种数据类型的性能影响是什么?
我应该用整数而不是 uint 来做所有与时间戳相关的数学运算吗?
当 getTimer 超过 int.MAX_VALUE 时会发生什么?
我没有任何“真实”的证据来支持我,但我认为他们这样做了,因为如果计时器确实翻转,您可以检测到这一点并相应地解释它。当 uint 计时器翻转时,将更难检测到。