show two digits at seconds when the stopwatch is above 1 minute
This commit is contained in:
parent
9262e7f072
commit
3dd7ffddc5
|
@ -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 -> {
|
||||||
|
|
Loading…
Reference in New Issue