Documentation
¶
Overview ¶
Package timeconv provides time conversion capabilities to Trickster
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UnitMap = map[string]int64{ "ns": int64(time.Nanosecond), "us": int64(time.Microsecond), "µs": int64(time.Microsecond), "μs": int64(time.Microsecond), "ms": int64(time.Millisecond), "s": int64(time.Second), "m": int64(time.Minute), "h": int64(time.Hour), "d": int64(24 * time.Hour), "w": int64(24 * 7 * time.Hour), "y": int64(24 * 365 * time.Hour), }
UnitMap provides a map of common time unit indicators to nanoseconds of duration per unit
Functions ¶
func ParseDuration ¶
ParseDuration returns a duration from a string. Slightly improved over the builtin, since it supports units larger than hour.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.