parse

open fun parse(value: String): Duration

Parse the given value to a duration.

Return

a duration

Parameters

value

the value to parse


abstract fun parse(value: String, unit: ChronoUnit): Duration

Parse the given value to a duration.

Return

a duration

Parameters

value

the value to parse

unit

the duration unit to use if the value doesn't specify one (null will default to ms)