toComponents (original) (raw)

Splits this duration into days, hours, minutes, seconds, and nanoseconds and executes the given action with these components. The result of action is returned as the result of this function.

Infinite durations are represented as either Long.MAX_VALUE days, or Long.MIN_VALUE days (depending on the sign of infinity), and zeroes in the lower components.

Since Kotlin

1.6


Splits this duration into hours, minutes, seconds, and nanoseconds and executes the given action with these components. The result of action is returned as the result of this function.

Infinite durations are represented as either Long.MAX_VALUE hours, or Long.MIN_VALUE hours (depending on the sign of infinity), and zeroes in the lower components.

Since Kotlin

1.6


Splits this duration into minutes, seconds, and nanoseconds and executes the given action with these components. The result of action is returned as the result of this function.

Infinite durations are represented as either Long.MAX_VALUE minutes, or Long.MIN_VALUE minutes (depending on the sign of infinity), and zeroes in the lower components.

Since Kotlin

1.6


Splits this duration into seconds, and nanoseconds and executes the given action with these components. The result of action is returned as the result of this function.

Infinite durations are represented as either Long.MAX_VALUE seconds, or Long.MIN_VALUE seconds (depending on the sign of infinity), and zero nanoseconds.

Since Kotlin

1.6