diff options
author | Felix Lange <fjl@twurst.com> | 2017-02-16 20:21:11 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2017-02-16 20:44:09 +0800 |
commit | 2c4455b12aca82ccd29c05c1750c25430867e545 (patch) | |
tree | 0beb8c96c7bf6a5a82434ed79218e822927434c3 /vendor/github.com/aristanetworks | |
parent | c8695fae359aa327da9203a57ffaf4f2d47d4370 (diff) | |
download | dexon-2c4455b12aca82ccd29c05c1750c25430867e545.tar dexon-2c4455b12aca82ccd29c05c1750c25430867e545.tar.gz dexon-2c4455b12aca82ccd29c05c1750c25430867e545.tar.bz2 dexon-2c4455b12aca82ccd29c05c1750c25430867e545.tar.lz dexon-2c4455b12aca82ccd29c05c1750c25430867e545.tar.xz dexon-2c4455b12aca82ccd29c05c1750c25430867e545.tar.zst dexon-2c4455b12aca82ccd29c05c1750c25430867e545.zip |
vendor: update dependencies with github.com/kardianos/govendor
Diffstat (limited to 'vendor/github.com/aristanetworks')
-rw-r--r-- | vendor/github.com/aristanetworks/goarista/monotime/nanotime.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/github.com/aristanetworks/goarista/monotime/nanotime.go b/vendor/github.com/aristanetworks/goarista/monotime/nanotime.go index efc1b92a6..5f5fbc7ae 100644 --- a/vendor/github.com/aristanetworks/goarista/monotime/nanotime.go +++ b/vendor/github.com/aristanetworks/goarista/monotime/nanotime.go @@ -6,6 +6,7 @@ package monotime import ( + "time" _ "unsafe" // required to use //go:linkname ) @@ -22,3 +23,9 @@ func nanotime() int64 func Now() uint64 { return uint64(nanotime()) } + +// Since returns the amount of time that has elapsed since t. t should be +// the result of a call to Now() on the same machine. +func Since(t uint64) time.Duration { + return time.Duration(Now() - t) +} |