Documentation
¶
Overview ¶
Package monotime provides functions to access monotonic clock source.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Now ¶
Now returns the current time in nanoseconds from a monotonic clock.
The time returned is based on some arbitrary platform-specific point in the past. The time returned is guaranteed to increase monotonically without notable jumps, unlike time.Now() from the Go standard library, which may jump forward or backward significantly due to system time changes or leap seconds.
It's implemented using runtime.nanotime(), which uses CLOCK_MONOTONIC on Linux. Note that unlike CLOCK_MONOTONIC_RAW, CLOCK_MONOTONIC is affected by time changes. However, time changes never cause clock jumps; instead, clock frequency is adjusted slowly.
Types ¶
This section is empty.