[Pkg] The Trunk: Kernel-ar.564.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Apr 7 09:05:10 UTC 2011

Andreas Raab uploaded a new version of Kernel to project The Trunk:

==================== Summary ====================

Name: Kernel-ar.564
Author: ar
Time: 7 April 2011, 11:04:21.248 am
UUID: 32ecb9c9-177a-ce45-9c1c-a3714c801929
Ancestors: Kernel-nice.563

Fix computation of Time>>milliseconds:since: which would compute incorrect deltas upon clock overflow.

=============== Diff against Kernel-nice.563 ===============

Item was added:
+ ----- Method: Time class>>millisecondClockMask (in category 'general inquiries') -----
+ millisecondClockMask
+ 	"The VM mask for the max. millisecond clock value.
+ 	This should be primitive but it ain't so it's copied inline from the Interpreter."
+ 	 ^16r1FFFFFFF!

Item was changed:
  ----- Method: Time class>>milliseconds:since: (in category 'squeak protocol') -----
  milliseconds: currentTime since: lastTime
  	"Answer the elapsed time since last recorded in milliseconds.
  	Compensate for rollover."
  	| delta |
  	delta := currentTime - lastTime.
  	^ delta < 0
+ 		ifTrue: [Time millisecondClockMask + delta]
- 		ifTrue: [SmallInteger maxVal + delta]
  		ifFalse: [delta]!

More information about the Packages mailing list