aboutsummaryrefslogtreecommitdiff
path: root/shared/src/commonMain/kotlin/mx
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-16 16:11:47 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-16 16:11:47 -0600
commit16b614d6f3fcc88924e79ac3a1bffef538b09e8b (patch)
treeb41918082a1bdd5ba4feea3e778cdd9aabf98bf9 /shared/src/commonMain/kotlin/mx
parent484c64d1682f65ad0741228963bdefda87b935ab (diff)
downloadetbsa-trackermap-mobile-16b614d6f3fcc88924e79ac3a1bffef538b09e8b.tar.gz
etbsa-trackermap-mobile-16b614d6f3fcc88924e79ac3a1bffef538b09e8b.tar.bz2
etbsa-trackermap-mobile-16b614d6f3fcc88924e79ac3a1bffef538b09e8b.zip
Added hourmeter field
Diffstat (limited to 'shared/src/commonMain/kotlin/mx')
-rw-r--r--shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt
index 878418e..c113bef 100644
--- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt
+++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt
@@ -1,7 +1,6 @@
package mx.trackermap.TrackerMap.utils
import kotlinx.datetime.*
-import kotlin.math.round
class Formatter {
companion object {
@@ -25,5 +24,9 @@ class Formatter {
}
}
}
+
+ fun formatHours(millis: Long): String {
+ return "${millis / (1000 * 60 * 60)} hr"
+ }
}
} \ No newline at end of file