[Vm-dev] Add primitiveMillisecondClockMask?

David T. Lewis lewis at mail.msen.com
Thu Apr 14 11:21:32 UTC 2011

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:

	"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.


More information about the Vm-dev mailing list