monotime - ActiveState ActiveGo 1.8

Package monotime

import ""

Overview ▾

Package monotime provides a fast monotonic clock source.

type Time

Time represents a point in monotonic time

type Time uint64

func Now

func Now() Time

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 at a constant rate, unlike time.Now() from the Go standard library, which may slow down, speed up, jump forward or backward, due to NTP activity or leap seconds.

func (Time) Add

func (t Time) Add(d time.Duration) Time