David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-dtl.486.mcz==================== Summary ====================
Name: Kernel-dtl.486
Author: dtl
Time: 29 August 2010, 12:18:28.667 pm
UUID: 4779fe02-9375-421c-8753-c7db6d686b03
Ancestors: Kernel-ul.485
Normalize new Duration instance if signs of seconds and nanoSeconds do not match. Fixes invalid printString for Duration in this case. DurationTest>>testNormalizeNanoSeconds passes now.
=============== Diff against Kernel-ul.485 ===============
Item was changed:
----- Method: Duration>>seconds:nanoSeconds: (in category 'private') -----
seconds: secondCount nanoSeconds: nanoCount
"Private - only used by Duration class"
seconds := secondCount.
+ nanos := nanoCount rounded.
+ "normalize if signs do not match"
+ [ nanos < 0 and: [ seconds > 0 ] ]
+ whileTrue: [ seconds := seconds - 1.
+ nanos := nanos + NanosInSecond ].
+ [ seconds < 0 and: [ nanos > 0 ] ]
+ whileTrue: [ seconds := seconds + 1.
+ nanos := nanos - NanosInSecond ]
+
- nanos := nanoCount rounded
!