[squeak-dev] microsecondClockValue
Eliot Miranda
eliot.miranda at gmail.com
Mon May 23 19:43:23 UTC 2016
Hi Tobias,
On Mon, May 23, 2016 at 11:58 AM, Tobias Pape <Das.Linux at gmx.de> wrote:
>
> On 23.05.2016, at 19:37, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
> > Hi All,
> >
> > I see that access to the microsecond clock is called
> "microsecondClockValue". This name is wrong. It derives from
> millisecondClockValue which was indeed a value. The millisecond clock
> started from zero on every image startup and wrapped around every 45 days
> or so. The microsecond clock is quite different; it is an absolute clock
> whose zero is midnight on January 1st 1901, the start of the 20th century
> (damn those monks). So "Value" should be omitted from the selector.
>
> Isn't it still a value? I frankly do not understand the distinction here..
> Even more, "microsecondClock" doesn't hand me a "clock" object… :)
>
The Smalltalk-80 code has always maintained the distinction:
Time secondClock
Time millisecondClockValue
The former is a clock, measuring time from a fixed point in history. the
latter is a counter starting from an arbitrary point. I find it a very
useful distinction. Our current microsecond time is a clock, not a value.
> Best regards
> -Tobias
>
>
> > In Squeak we provide both Time utcMicrosecondClock and Time
> localMicrosecondClock which provide the number of microseconds since the
> start of 1/1/1901 in utc and local time zones respectively. It wraps round
> no sooner than 24/4/20168 (/not/ 2168). Time millisecondClockValue is
> provided for backward compatibility.
> >
> > _,,,^..^,,,_
> > best, Eliot
>
>
>
>
--
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160523/26d9cf35/attachment.htm
More information about the Squeak-dev
mailing list
|