[squeak-dev] primMicrosecondClock?

Eliot Miranda eliot.miranda at gmail.com
Fri Jan 7 00:48:11 UTC 2011


Hi Yoshiki,

On Thu, Jan 6, 2011 at 2:58 PM, Yoshiki Ohshima <yoshiki at vpri.org> wrote:

>  Hello,
>
>  I'm looking at primMicrosecondClock on Windows with 4.1.1 VM and Cog
> 2341 just to profile parts of my code (so when is the epoch, and
> etc. does not matter here).
>
>  I code snippet like this:
>
> | t |
> t := Time primMicrosecondClock.
> (Delay forSeconds: 1) wait.
> Time primMicrosecondClock - t
>
> and I get "1001" or "1000" on 4.1.1 and "0" on Cog... Where does it
> stand?
>

Cog supports a 64-bit microsecond clock, epoch 1st Jan 1901.  Primitive 240
is utcMicrosecondsFrom1901, 241 is localMicrosecondsFrom1901.  Cog doesn't
support the 32-bit microsecond clock in the standard VM, because a clock
that wraps in at most 11 hours makes no sense to me, whereas a single clock
that'll serve for high-resolution and won't wrap for a few thousand years
does.  Hopefully we'll harmonise on the 64-bit clock.


>  Searching in the email archive, it appears that it "works" on Unix
> VM.  Is it reliably working?  How about Mac?
>
> -- Yoshiki
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20110106/9cb3e9ef/attachment.htm


More information about the Squeak-dev mailing list