[squeak-dev] Time primitives

Levente Uzonyi leves at elte.hu
Tue Apr 7 20:43:09 UTC 2015


Hi All,

CogVM has two really nice time primitives 240 and 241. These are available 
via Time class >> #primUTCMicrosecondClock and Time class >> 
#primLocalMicrosecondClock.

But there are two problems with them.
1. They are not available in the Interpreter VM (It has a similar named
primitive - primitiveUtcWithOffset - available as Time class >> 
#primPosixMicrosecondClockWithOffset, but that's not supported in Cog, and 
I'd like to see its behavior changed slightly*)
2. Primitive 240 is available in Pharo under a similar, but slightly 
different name: #primUTCMicrosecondsClock. There are also derived 
"primitive" methods: #primUTCSecondsClock and #primUTCMillisecondsClock.

Questions:
- Which name should we use?
  - #primUTCMicrosecondClock
  - #primUTCMicrosecondsClock
  - something else

- Can/should the interpreter VM support primitive 240 and 241?

- Can/should CogVM support the name primitive primitiveUtcWithOffset?

- Do we want the derived "primitives" #primUTCSecondsClock and 
#primUTCMillisecondsClock in Squeak?


Levente

* The primitive could accept an array as argument and fill that with the 
values if present. This could prevent frequent GCs when the primitive is 
used repeatedly.


More information about the Squeak-dev mailing list