diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-10-19 01:36:38 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-10-19 01:36:38 +0200 |
| commit | 8346c05bbfc6d227f3f02c7ee5ec5ceb8f7e4348 (patch) | |
| tree | abd765aff43edd19db6ba147d7cf8e1d3145e873 /src/main/kotlin/util/TimeMark.kt | |
| parent | 28c3ba952d69c8a654301c9211d536493513fdd5 (diff) | |
| download | Firmament-8346c05bbfc6d227f3f02c7ee5ec5ceb8f7e4348.tar.gz Firmament-8346c05bbfc6d227f3f02c7ee5ec5ceb8f7e4348.tar.bz2 Firmament-8346c05bbfc6d227f3f02c7ee5ec5ceb8f7e4348.zip | |
feat: add skin preview exporter
Diffstat (limited to 'src/main/kotlin/util/TimeMark.kt')
| -rw-r--r-- | src/main/kotlin/util/TimeMark.kt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/kotlin/util/TimeMark.kt b/src/main/kotlin/util/TimeMark.kt index 4a076ac..112a727 100644 --- a/src/main/kotlin/util/TimeMark.kt +++ b/src/main/kotlin/util/TimeMark.kt @@ -2,6 +2,7 @@ package moe.nea.firmament.util import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds +import kotlin.time.DurationUnit class TimeMark private constructor(private val timeMark: Long) : Comparable<TimeMark> { fun passedTime() = @@ -50,3 +51,7 @@ class TimeMark private constructor(private val timeMark: Long) : Comparable<Time return this.timeMark.compareTo(other.timeMark) } } + +fun Duration.toTicks(): Long { + return toLong(DurationUnit.MILLISECONDS) / 50 +} |
