toTimeValue
The toTimeValue() function converts a TheTime or SerializedTheTime into a numeric value (milliseconds). It applies the makeSafeTimeValue safeguards: rounding decimals and clamping between minTimeValue and maxTimeValue.
Interactive example
Syntax
typescript
function toTimeValue<
GenericInput extends TheTime | SerializedTheTime
>(
input: GenericInput
): numberParameters
input: Duration formatted asTheTimeorSerializedTheTime.
Return value
The numeric value in milliseconds, clamped to minTimeValue and maxTimeValue.
