<br><br><div class="gmail_quote">On Tue, Aug 24, 2010 at 10:18 AM, Andreas Raab <span dir="ltr">&lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
On 8/24/2010 9:43 AM, Eliot Miranda wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
With these four one has a non-wrapping synchronised timebase with<br>
potentially microsecond resolution that marries well with Squeak&#39;s<br>
64-bit integer support.  This approach worked very well for VisualWorks<br>
where we got rid of lots of customer problems every 49.7 days (2^32<br>
milliseconds).  There has been some concern expressed about the<br>
performance impact of long integers but at least in VW that simply<br>
wasn&#39;t an issue.<br>
</blockquote>
<br>
For general purpose apps, sure. Remember that my concern is what the effect of switching to largeint arithmetic is on our routers which time-stamp in and outgoing packets at several points so that we can keep track of latencies and where they&#39;re introduced. I will absolutely believe that in &quot;average&quot; use there&#39;s not going to be an impact, but I don&#39;t think that what we&#39;re doing (timestamping millions of times per second) can be exactly considered average here :-) You&#39;ll recall that the introduction of the jiffy clock was in response to the server spending some 20% or so in gettimeofday...<br>
</blockquote><div><br></div><div>Hmmm.  Then, given that the clock&#39;s effective resolution is around 500Hz-1KHz, and that the 64-bit result is effectively immutable, there could be significant benefit in the primitive cacheing the current result, instantiating a new result object only when the time actually changes.</div>
<div><br></div><div>best</div><div>Eliot</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Cheers,<br>
  - Andreas<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
best<br>
Eliot<br>
<br>
<br>
    Thanks,<br>
    Dave<br>
<br>
<br>
    On Mon, Aug 23, 2010 at 11:04:57AM -0700, Eliot Miranda wrote:<br>
     &gt;<br>
     &gt; On Sun, Aug 22, 2010 at 7:39 PM, David T. Lewis<br>
    &lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a> &lt;mailto:<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt;&gt; wrote:<br>
     &gt;<br>
     &gt; &gt;<br>
     &gt; &gt; Eliot,<br>
     &gt; &gt;<br>
     &gt; &gt; Yes, it can be retracted. I may not get to it for a few days so<br>
    feel<br>
     &gt; &gt; free to do so on my behalf. I introduced the change in trunk to put<br>
     &gt; &gt; some visibility on the new primitives, which appears to have<br>
    achieved<br>
     &gt; &gt; the intended purpose ;)<br>
     &gt; &gt;<br>
     &gt; &gt; With respect to the Squeak epoch, we do have an issue that needs to<br>
     &gt; &gt; be clarified. In the Squeak implementation, we have the 1901 epoch,<br>
     &gt; &gt; but AFAIK there is no specification of the time zone in which<br>
    the epoch<br>
     &gt; &gt; is defined. In the Squeak implementation, local time has<br>
    consistently<br>
     &gt; &gt; been used in the platform interface, and the actual values of the<br>
     &gt; &gt; Squeak clock for any real point in time are different depending on<br>
     &gt; &gt; the time zone in which the image happens to be running.<br>
     &gt; &gt;<br>
     &gt;<br>
     &gt; It&#39;s implicit that it is GMT/UTC.  So the Squeak epoch is the<br>
    start of 1901<br>
     &gt; in Greenwich.<br>
     &gt;<br>
     &gt; To put it another way, there is no such thing as &quot;UTC &amp; local<br>
     &gt; &gt; microseconds from the Smalltalk epoch&quot; unless there is a clearly<br>
     &gt; &gt; defined transformation between the Smalltalk epoch and the posix<br>
     &gt; &gt; epoch, and in practice (in Squeak at least) this is not the case.<br>
     &gt; &gt; Midnight on January 1, 1901 in Palo Alto, California was a<br>
    different<br>
     &gt; &gt; point in time from midnight January 1, 1901 in London, and I cannot<br>
     &gt; &gt; determine which of the two was the &quot;real&quot; Smalltalk epoch.<br>
     &gt; &gt;<br>
     &gt;<br>
     &gt; The latter is the only one that makes good sense.<br>
     &gt;<br>
     &gt;<br>
     &gt; &gt; This begs the question of why, in implementing the interface to<br>
     &gt; &gt; the underlying platform, we would *not* want use the posix epoch<br>
     &gt; &gt; as a reference point. The Posix epoch is well defined, well<br>
    documented,<br>
     &gt; &gt; well understood, and easily translated to any existing<br>
    definition of<br>
     &gt; &gt; the Smalltalk epoch. In contrast, the Smalltalk epoch is<br>
    ambiguously<br>
     &gt; &gt; defined, poorly documented, and widely misunderstood.<br>
     &gt; &gt;<br>
     &gt;<br>
     &gt; I think its easy to fix; just define it to be the start of the<br>
    20th century<br>
     &gt; in UTC.  That&#39;s what we did with VW and its easy to do with<br>
    Squeak.  For me<br>
     &gt; backwards compatibility pushes strongly for keeping with the<br>
    Squeak epoch,<br>
     &gt; i.e. Time seconds = Time milliseconds / 1000000.<br>
     &gt;<br>
     &gt; best,<br>
     &gt; Eliot<br>
     &gt;<br>
     &gt;<br>
     &gt; &gt;<br>
     &gt; &gt; Dave<br>
     &gt; &gt;<br>
     &gt; &gt; On Sat, Aug 14, 2010 at 05:28:28PM -0700, Eliot Miranda wrote:<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; Hi David,<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt;     any chance of getting you to retract this?  The Cog VM<br>
    has 64-bit UTC<br>
     &gt; &gt; &amp;<br>
     &gt; &gt; &gt; local microseconds from the Smalltalk epoch (1901), which are<br>
    hence<br>
     &gt; &gt; easier<br>
     &gt; &gt; &gt; to use as a basis for the Squeak clock and still last for ~<br>
    54,000 years.<br>
     &gt; &gt; &gt;  I&#39;d like to see the Cog and standard VMs converge on a<br>
    primitive set.<br>
     &gt; &gt;  This<br>
     &gt; &gt; &gt; is an issue for me since changing the epoch is, I think, an<br>
    unnecessary<br>
     &gt; &gt; &gt; change.<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; best<br>
     &gt; &gt; &gt; Eliot<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; On Sat, Aug 14, 2010 at 4:55 PM, &lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a><br>
    &lt;mailto:<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;&gt; wrote:<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; &gt; Changes to Trunk (<a href="http://source.squeak.org/trunk.html" target="_blank">http://source.squeak.org/trunk.html</a>) in<br>
    the last 24<br>
     &gt; &gt; &gt; &gt; hours:<br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt;<br>
    <a href="http://lists.squeakfoundation.org/pipermail/packages/2010-August/003596.html" target="_blank">http://lists.squeakfoundation.org/pipermail/packages/2010-August/003596.html</a><br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt; &gt; &gt; Name: Kernel-dtl.476<br>
     &gt; &gt; &gt; &gt; Ancestors: Kernel-eem.475<br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt; &gt; &gt; Add Time class&gt;&gt;primMicrosecondClock and Time<br>
    class&gt;&gt;primUtcWithOffset<br>
     &gt; &gt; for<br>
     &gt; &gt; &gt; &gt; access to microsecond clock primitives available in newer<br>
    Squeak VMs.<br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt; &gt; &gt; primMicrosecondClock provides a system clock with nominal<br>
    microsecond<br>
     &gt; &gt; &gt; &gt; precision.<br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt; &gt; &gt; primUtcWithOffset answers UTC time as microseconds since<br>
    the Posix<br>
     &gt; &gt; epoch<br>
     &gt; &gt; &gt; &gt; and offset as seconds offset from GMT. The Squeak clock is<br>
     &gt; &gt; traditionally<br>
     &gt; &gt; &gt; &gt; implemented in terms of platform local time. Use of UTC<br>
    time and offset<br>
     &gt; &gt; is<br>
     &gt; &gt; &gt; &gt; advantageous if time zones and daylight saving time offsets<br>
    are to be<br>
     &gt; &gt; &gt; &gt; considered.<br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt; &gt; &gt; Example:<br>
     &gt; &gt; &gt; &gt; { Time primMillisecondClock .<br>
     &gt; &gt; &gt; &gt;   Time primMicrosecondClock .<br>
     &gt; &gt; &gt; &gt;   Time primUtcWithOffset } ==&gt; #(6932757 6932757830<br>
    #(1281815075538304<br>
     &gt; &gt; &gt; &gt; -14400))<br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt; &gt; &gt; =============================================<br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt; &gt; &gt;<br>
     &gt; &gt;<br>
     &gt; &gt;<br>
<br>
<br>
</blockquote>
</blockquote></div><br>