Skip to main content
Version: 1.3.0

Duration

A duration can be represented as an integer, in which case it represents seconds or a duration string.

Duration String​

Examples​

"1h30m" # 1 hour and 30 minutes
"1.5h" # 1 hour and 30 minutes
"2m" # 2 minutes
"10s" # 10 seconds
"300s" # 300 seconds

Units​

"ns" # nanoseconds
"us"/"µs" # microseconds
"ms" # milliseconds
"s" # seconds
"m" # minutes
"h" # hours

See Golang's official documentation for more information

Integer Seconds​

Examples:

"120" # 120 seconds (2 minutes)
"900" # 900 seconds (15 minutes)