show two digits at seconds when the stopwatch is above 1 minute

This commit is contained in:
tibbi 2018-03-28 23:09:22 +02:00
parent 9262e7f072
commit 3dd7ffddc5
1 changed files with 2 additions and 2 deletions

View File

@ -14,11 +14,11 @@ fun Long.formatStopwatchTime(useLongerMSFormat: Boolean): String {
return when { return when {
hours > 0 -> { hours > 0 -> {
val format = "%02d:%02d:%d.$MSFormat" val format = "%02d:%02d:%02d.$MSFormat"
String.format(format, hours, minutes, seconds, ms) String.format(format, hours, minutes, seconds, ms)
} }
minutes > 0 -> { minutes > 0 -> {
val format = "%02d:%d.$MSFormat" val format = "%02d:%02d.$MSFormat"
String.format(format, minutes, seconds, ms) String.format(format, minutes, seconds, ms)
} }
else -> { else -> {