duration
Casts an expression to a duration value.
duration(x:string) -> duration
Description
Section titled “Description”The duration
function casts the given string x
to a duration value.
Examples
Section titled “Examples”Cast a string to a duration
Section titled “Cast a string to a duration”from {str: "1ms"}dur = duration(str)
{str: "1ms", dur: 1ms}