Search code examples
linuxtimegomulticorenanotime

Does System.nanotime leap back or forward


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


Solution

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