aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-07-11 21:01:58 +0200
committernea <nea@nea.moe>2023-07-11 21:01:58 +0200
commit4d93f475aadc42c4bf83c3a0749af41659235c71 (patch)
treec8e01710defe66e06c50fa962c72fdac66a35a1f /src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt
parent4444fcca44d9a53c8162d69e0e9f19fd214c2f54 (diff)
downloadfirmament-4d93f475aadc42c4bf83c3a0749af41659235c71.tar.gz
firmament-4d93f475aadc42c4bf83c3a0749af41659235c71.tar.bz2
firmament-4d93f475aadc42c4bf83c3a0749af41659235c71.zip
Bulk commit
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt b/src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt
index ba77b04..a3e93ae 100644
--- a/src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt
+++ b/src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt
@@ -2,6 +2,7 @@ package moe.nea.firmament.util
import com.google.common.math.IntMath.pow
import kotlin.math.absoluteValue
+import kotlin.time.Duration
object FirmFormatters {
fun toString(float: Float, fractionalDigits: Int): String = toString(float.toDouble(), fractionalDigits)
@@ -13,4 +14,8 @@ object FirmFormatters {
return long.toString() + (if (digits.isEmpty()) "" else ".$digits")
}
+ fun formatTimespan(duration: Duration): String {
+ return duration.toString()
+ }
+
}