Millisecond clock resolution for DateAndTime now

David T. Lewis lewis at mail.msen.com
Wed Sep 22 03:24:35 UTC 2004


On Tue, Sep 21, 2004 at 07:44:44PM -0700, John M McIntosh wrote:
> I guess one could lobby for
> unix (tm) gettimeofday()
> for 3.9
> This could even be via a plugin, or FFI call...

For what it's worth, there is a TimePlugin included in the TimeZoneDatabase on
SqueakMap. In includes TimePlugin>>primitiveLocalSecondsClockWithOffset, which
uses gettimeofday() to answer the time in the form of a Float (see class comment
of PointInTime for the justification).

Hmmm, looks like I have neglected to update this plugin since 1999. I am attaching
a patch that makes it work with the latest VMMaker.

Dave

p.s. I just tried switching PointInTime to use ScaledDecimal, and it works
fine. So I guess I'm not too worried about that 100 year deadline on the
millisecond clock rollover. Ain't Squeak great?

p.p.s Has anybody tried adding the TimeZoneDatabase to a Seaside application?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TimePluginUpdate-dtl.1.cs.gz
Type: application/x-gunzip
Size: 2118 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040921/acbe1273/TimePluginUpdate-dtl.1.cs.bin


More information about the Squeak-dev mailing list