[Vm-dev] microsecond timing for GC work

David T. Lewis lewis at mail.msen.com
Thu Jan 21 13:31:50 UTC 2010


On Thu, Jan 21, 2010 at 11:46:29AM +0100, Bert Freudenberg wrote:
> 
> On 21.01.2010, at 03:41, David T. Lewis wrote:
> > 
> > OK, attached is an implementation of #primitiveUtcWithOffset. It
> > answers an array with UTC time in microseconds since the Posix epoch,
> > and with GMT offset in seconds in the local time zone.
> > 

> I was about to comment that gettimeofday() answers UTC while ioSeconds() currently uses time() which is "seconds since 0:00:00, Jan 1, 1970, Coordinated Universal Time, *without including leap seconds*" according to the BSD man page, but apparently it was later redefined in terms of UTC:
> http://en.wikipedia.org/wiki/Unix_time
> 
> In any case, in the LocalePlugin I took care to have the timezone offset match the behavior of convertToSqueakTime() which in turn is used by ioSeconds():

> I think we should arrange to have ioUtcWithOffset() be used in all the other places to ensure a consistent interpretation of time ...

Bert,

Does the use of microseconds for time and seconds for offset make sense
to you?  In both cases this is more precision than required, but I could
see no good reason to reduce the precision.

We will need to be careful about using this everywhere, because use of
large integers for time values might have performance implications. It
will probably be OK, but I have not measured anything to check.

Dave



More information about the Vm-dev mailing list