mirror of
https://github.com/jellyfin/jellyfin-sdk-kotlin.git
synced 2024-11-23 22:09:53 +00:00
Add Duration.inWholeTicks to convert a Duration to ticks
This commit is contained in:
parent
44f85694b7
commit
6dc72ca5be
@ -20,3 +20,8 @@ public inline val Int.ticks: Duration get() = times(100).toDuration(DurationUnit
|
||||
* Returns a [Duration] equal to this [Double] number of ticks.
|
||||
*/
|
||||
public inline val Double.ticks: Duration get() = times(100.0).toDuration(DurationUnit.NANOSECONDS)
|
||||
|
||||
/**
|
||||
* The value of this duration expressed as a [Long] number of ticks.
|
||||
*/
|
||||
public val Duration.inWholeTicks: Long get() = toLong(DurationUnit.NANOSECONDS).div(100L)
|
||||
|
Loading…
Reference in New Issue
Block a user