[squeak-dev] Add primitiveMillisecondClockMask? (was: The Trunk: Kernel-ar.564.mcz)

Igor Stasenko siguctua at gmail.com
Thu Apr 14 08:22:27 UTC 2011


On 13 April 2011 20:57, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
>
> On Wed, Apr 13, 2011 at 11:09 AM, David T. Lewis <lewis at mail.msen.com>
> wrote:
>>
>> On Thu, Apr 07, 2011 at 09:04:41AM +0000, commits at source.squeak.org wrote:
>> >
>> > Andreas Raab uploaded a new version of Kernel to project The Trunk:
>> > http://source.squeak.org/trunk/Kernel-ar.564.mcz
>> >
>> > ==================== 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!
>> >
>>
>> Agreed, the millisecondClockMask should be available from a primitive.
>> Should I make it so?
>
> Personally I would much rather see us move to the 64-bit millisecond clock I
> implemented for Cog. This renders the whole clock roll-over issue moot.

Except that if you change clock on your machine, Cog hangs, because it
doesn't takes into account
that clock counter could 'advance' backwards.
This could happen either when user changes system time, or if your
machine synchronizing clock via network.

I plagued by this issue, because i using dual boot MacOS/Windows on my
machine , and windows
writes UTC clock value to CMOS, while MacOS treats it as a local time,
so when i reboot under MacOS, my time is always 1 (or 2) hours in
advance.
Which is pretty annoying. And every time i changing the clock i need
to watch out if i don't have any images open.

A solution to that, i think, is to handle system event which tells
that user changed current time.
But i'm not sure if all platforms support such kind of event, and how
to listen for it.

>> Eliot
>
>>
>> Dave



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list