From 3dd7ffddc50c94da4c24c4b5231ac368adcbb26a Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 28 Mar 2018 23:09:22 +0200 Subject: [PATCH] show two digits at seconds when the stopwatch is above 1 minute --- .../kotlin/com/simplemobiletools/clock/extensions/Long.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Long.kt b/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Long.kt index 4e670890..2b29f682 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Long.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Long.kt @@ -14,11 +14,11 @@ fun Long.formatStopwatchTime(useLongerMSFormat: Boolean): String { return when { hours > 0 -> { - val format = "%02d:%02d:%d.$MSFormat" + val format = "%02d:%02d:%02d.$MSFormat" String.format(format, hours, minutes, seconds, ms) } minutes > 0 -> { - val format = "%02d:%d.$MSFormat" + val format = "%02d:%02d.$MSFormat" String.format(format, minutes, seconds, ms) } else -> {