--- a/TimeDuration.st Wed Jan 31 09:36:10 2018 +0100
+++ b/TimeDuration.st Wed Jan 31 10:03:29 2018 +0100
@@ -1201,14 +1201,18 @@
overAllSeconds > 2 ifTrue:[
overAllSeconds > 10 ifTrue:[
overAllSeconds > 300 ifTrue:[
+ "/ no decimal above 300 seconds
fmt := fmt , '%Ss'
] ifFalse:[
+ "/ 1 decimals up to 300 seconds
fmt := fmt , '%S.%(milli1)s'
]
] ifFalse:[
+ "/ 2 decimals up to 10seconds
fmt := fmt , '%S.%(milli2)s'
]
] ifFalse:[
+ "/ millis up to 2seconds
fmt := fmt , '%S.%is'
]
]
@@ -1224,6 +1228,9 @@
"
(TimeDuration hours:0 minutes:0 seconds:0 milliseconds:12) formatForPrinting
+ (TimeDuration hours:0 minutes:0 seconds:2 milliseconds:12) formatForPrinting
+ (TimeDuration hours:0 minutes:0 seconds:8 milliseconds:12) formatForPrinting
+ (TimeDuration hours:0 minutes:0 seconds:10 milliseconds:12) formatForPrinting
(TimeDuration hours:0 minutes:0 seconds:0 milliseconds:123) formatForPrinting
(TimeDuration hours:0 minutes:0 seconds:10 milliseconds:123) formatForPrinting