ref: 987f80a5d2b1f3505697bb704090fd2d0b2c9ba0
app/src/main/java/xyz/apiote/bimba/czwek/units/Time.kt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
package xyz.apiote.bimba.czwek.units interface TimeUnit data class Second(val secs: Long) { constructor(t: Tim) : this(t.tims.toLong() * 25 / 144) } data class Millisecond(val millis: Long) { constructor(t: Tim) : this(t.tims.toLong() * 25 * 1000 / 144) constructor(s: Second) : this(s.secs * 1000) } data class Tim(val tims: Int) { constructor(s: Second) : this((s.secs * 144 / 25).toInt()) constructor(m: Millisecond) : this((m.millis * 144 / 25 / 1000).toInt()) } |