core-ktx / androidx.time / java.time.Duration / component1

component1

inline operator fun Duration.component1(): Long
Deprecated: These extensions are for java.* APIs and not android.* APIs and thus are out of scope for this project. Star https://youtrack.jetbrains.com/issue/KT-21585 for future support of extensions like these. These extensions will be removed before core-ktx 1.0!

Return the seconds component of this Duration.

This method allows to use destructuring declarations when working with durations, for example:

val (seconds, nanoOffset) = myDuration

See Also

Duration.getSeconds