Does System.nanotime leap back or forward

huangapple go评论68阅读模式
英文:

Does System.nanotime leap back or forward

问题

我在互联网上找到了多个(相互矛盾的)关于System.Nanotime是否会“向后或向前跳跃”的来源。

我找到的一些来源表明,时钟重置不会影响System.nanotime。
但是服务器重新启动会改变system.nanotime吗?
是否存在System.Nanotime会向后或向前跳跃的情况?

具体来说:我将使用GO的Ticker,它在内部依赖nanotime。

英文:

I found multiple (conflicting) sources on the internet about whether System.Nanotime does or does not "leap back\forward"

I found sources to indicate that clock resets do not affect System.nanotime.
But do server restarts change system.nanotime?
Are there situations in which System.Nanotime does leap back or forward?

To be specific: I will be using GO's Ticker which internally relies on nanotime

答案1

得分: 1

Go在Linux、FreeBSD、OpenBSD、DragonflyBSD和Windows上使用单调定时器。

英文:

Go uses monotonic timers for Linux, FreeBSD, OpenBSD, DragonflyBSD, and Windows.

huangapple
  • 本文由 发表于 2016年2月15日 01:53:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/35395092.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定