mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 13:28:01 -05:00
* remove roughtime * change all references * rename Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
22 lines
399 B
Go
22 lines
399 B
Go
// Package timeutils is a wrapper around the go standard time library.
|
|
package timeutils
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Since returns the duration since t.
|
|
func Since(t time.Time) time.Duration {
|
|
return Now().Sub(t)
|
|
}
|
|
|
|
// Until returns the duration until t.
|
|
func Until(t time.Time) time.Duration {
|
|
return t.Sub(Now())
|
|
}
|
|
|
|
// Now returns the current local time.
|
|
func Now() time.Time {
|
|
return time.Now()
|
|
}
|