#BUGFIX by stefan
authorStefan Vogel <sv@exept.de>
Mon, 02 Mar 2020 14:28:02 +0100
changeset 25311 3ef66bb4ec5a
parent 25310 c475824e065e
child 25312 b8687d94e230
#BUGFIX by stefan class: TimeDuration comment/format in: #formatForPrinting: class: TimeDuration class comment/format in: #toRun: changed: #microseconds: do not truncate microseconds
TimeDuration.st
--- a/TimeDuration.st	Thu Feb 27 15:24:35 2020 +0100
+++ b/TimeDuration.st	Mon Mar 02 14:28:02 2020 +0100
@@ -197,7 +197,7 @@
      compatibility with the historic interface."
 
     microseconds == 0 ifTrue:[^ TimeDurationZero].
-    ^ self basicNew setMilliseconds:((microseconds / 1000) rounded).
+    ^ self basicNew setMicroseconds:microseconds rounded.
 
     "
      TimeDuration microseconds:2499 
@@ -205,7 +205,7 @@
      TimeDuration microseconds:12345678900 
     "
 
-    "Modified (comment): / 22-05-2018 / 16:54:17 / Stefan Vogel"
+    "Modified: / 02-03-2020 / 14:16:07 / Stefan Vogel"
 !
 
 milliseconds:m
@@ -599,7 +599,10 @@
      TimeDuration toRun:[ 20000 factorial ]     
      TimeDuration toRun:[ 2000 factorial ]     
      TimeDuration toRun:[ 900 factorial ]     
+     TimeDuration toRun:[ 10 factorial ]     
     "
+
+    "Modified (comment): / 02-03-2020 / 14:15:09 / Stefan Vogel"
 ! !
 
 !TimeDuration methodsFor:'Compatibility-Squeak'!
@@ -2183,6 +2186,8 @@
      (TimeDuration fromString:'7d') printString
      (TimeDuration fromString:'6d') printString
 
+     10 microSeconds formatForPrinting:false
+     1microSeconds formatForPrinting:false
      (TimeDuration fromMilliseconds:0.5) printString
      (TimeDuration fromMilliseconds:0.05) printString
      (TimeDuration fromMilliseconds:0.005) printString
@@ -2225,6 +2230,7 @@
     "Modified: / 18-07-2007 / 14:06:17 / cg"
     "Modified (comment): / 17-05-2017 / 16:35:56 / mawalch"
     "Modified: / 23-05-2018 / 10:36:21 / Claus Gittinger"
+    "Modified (comment): / 02-03-2020 / 11:54:02 / Stefan Vogel"
 !
 
 getHours