[Vm-dev] Add primitiveMillisecondClockMask?
Eliot Miranda
eliot.miranda at gmail.com
Thu Apr 14 18:58:17 UTC 2011
On Thu, Apr 14, 2011 at 5:39 AM, Andreas Raab <andreas.raab at gmx.de> wrote:
>
> On 4/14/2011 13:21, David T. Lewis wrote:
>
>>
>> On Thu, Apr 14, 2011 at 11:27:48AM +0200, Andreas Raab wrote:
>>
>>>
>>>
>>> On 4/13/2011 20:09, David T. Lewis wrote:
>>>
>>>> Agreed, the millisecondClockMask should be available from a primitive.
>>>> Should I make it so?
>>>>
>>> Sure. I would do it via a vm attribute.
>>>
>>> Cheers,
>>> - Andreas
>>>
>> The named primitive is trivial, so I think this is probably the simplest
>> thing to do:
>>
>> primitiveMillisecondClockMask
>> "Provide access to the millisecond clock mask to support
>> calculation
>> of durations based on the millisecond clock value."
>>
>> <export: true>
>> self pop: 1 thenPush: (self integerObjectOf: MillisecondClockMask)
>>
>> On the image side, call the primitive at #startUp: time, save the
>> value in a class variable for speed, and use the default 16r1FFFFFFF
>> if the primitive is not present.
>>
>
> You're right. It also makes it easier to remove the primitive later (i.e.,
> the change is completely self-contained).
>
+1
>
> Cheers,
> - Andreas
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110414/2da0adec/attachment.htm
More information about the Vm-dev
mailing list