Registry / utility / getlantern-mtime

getlantern-mtime

JSON →
library0.0.0-20200417132445-23682092d1f7gogounverified

Provides a fast monotonic clock source for measuring elapsed time, based on aristanetworks/monotime.

go get github.com/getlantern/mtime
INSTALL
IMPORT
SIG · GETLANTERN-MTIME
G
getlantern-mtime
utilitygov0.0.0-20200417132445-23682092d1f7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mtime
github.com/getlantern/mtime

Measures elapsed time using a monotonic clock.

package main import ( "fmt" "github.com/getlantern/mtime" "time" ) func main() { start := mtime.Now() time.Sleep(100 * time.Millisecond) elapsed := mtime.Since(start) fmt.Println(elapsed) }
Debug
Known issues
gotchaInstants are not real times; they are only useful for measuring elapsed time.
fix
Do not use mtime.Now() for wall-clock time; use time.Now() instead.
affects: >=0.0.0
Upgrade
Version history
0.0.0-20200417132445-23682092d1f7latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
getlantern-mtime — go get getlantern-mtime · libregistry