diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-16 16:11:47 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-16 16:11:47 -0600 |
commit | 2a1c3421f2b8a03bd09503ae5df9ab4cede8a83c (patch) | |
tree | b41918082a1bdd5ba4feea3e778cdd9aabf98bf9 /shared | |
parent | 9786da25f385c51b50f398d1c2c1fe7973645c5d (diff) | |
download | etbsa-trackermap-mobile-2a1c3421f2b8a03bd09503ae5df9ab4cede8a83c.tar.gz etbsa-trackermap-mobile-2a1c3421f2b8a03bd09503ae5df9ab4cede8a83c.tar.bz2 etbsa-trackermap-mobile-2a1c3421f2b8a03bd09503ae5df9ab4cede8a83c.zip |
Added hourmeter field
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt | 5 |
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 |