<div dir="ltr">I stopped reading the Pharo list because there was *so* much traffic that I couldn&#39;t see my own email through it. And most of the traffic wasn&#39;t terribly interesting to me. Is there code we can (maybe modify and) use?<div>
<br></div><div style>I don&#39;t think there&#39;s anything wrong with forwarding an exigent discussion from that pharo list here, we just need an &quot;exigency filter&quot; who reads the Pharo list *nudge.* </div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 7, 2013 at 8:36 AM, Frank Shearar <span dir="ltr">&lt;<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Everyone here is aware of the enormous amount of traffic on the Pharo<br>
list about getting these kinds of Delay problems sorted out, right?<br>
<span class="HOEnZb"><font color="#888888"><br>
frank<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 7 August 2013 16:14, Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt; wrote:<br>
&gt; Yes, making Delays work accurately wrt wall-clock time would be more work<br>
&gt; now that I think about it. This seems to be better handled in a higher-level<br>
&gt; object.<br>
&gt;<br>
&gt; - Bert -<br>
&gt;<br>
&gt; On 2013-08-07, at 16:16, Bob Arning &lt;<a href="mailto:arning315@comcast.net">arning315@comcast.net</a>&gt; wrote:<br>
&gt;<br>
&gt; I was thinking about that, but I suspect there are use cases for both image<br>
&gt; time and real-world time. Maybe something like<br>
&gt;<br>
&gt; (Delay until: someRealTime) wait<br>
&gt;<br>
&gt; would meet the need the current Delay does not.<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Bob<br>
&gt;<br>
&gt; On 8/7/13 9:54 AM, Bert Freudenberg wrote:<br>
&gt;<br>
&gt; That has to be one of the oldest bugs! It&#39;s been there forever. I just<br>
&gt; committed that to trunk.<br>
&gt;<br>
&gt; There is still a problem though. Squeak&#39;s delays (with Bob&#39;s fix) are based<br>
&gt; on image &quot;running time&quot;. That is, if I have a 1 hour delay and snapshot the<br>
&gt; image after 45 minutes, on the next day it will expire 15 minutes after<br>
&gt; starting the image.<br>
&gt;<br>
&gt; But arguably a delay should really expire by the same wall-clock time as<br>
&gt; when it was scheduled, even across snapshots. This is how it was handled in<br>
&gt; Smalltalk-80. Here&#39;s the ST80 code:<br>
&gt;<br>
&gt; Delay&gt;&gt;preSnapshot<br>
&gt; &quot;convert from local millisecond clock to milliseconds since Jan. 1 1901&quot;<br>
&gt; pendingDelay _ resumptionTime - Time millisecondClockValue.<br>
&gt; resumptionTime _ Time totalSeconds * 1000 + pendingDelay<br>
&gt;<br>
&gt; Delay&gt;&gt;postSnapshot<br>
&gt; &quot;convert from milliseconds since Jan. 1 1901 to local millisecond clock&quot;<br>
&gt; pendingDelay _ resumptionTime - (Time totalSeconds * 1000).<br>
&gt; pendingDelay _ pendingDelay max: 0.<br>
&gt; resumptionTime _ Time millisecondClockValue + pendingDelay<br>
&gt;<br>
&gt; Of course, we would have to use UTC nowadays but I still think<br>
&gt; re-implementing this would be a good idea.<br>
&gt;<br>
&gt; In any case, the fix makes the Delay snapshotting behavior at least<br>
&gt; predictable :)<br>
&gt;<br>
&gt; - Bert -<br>
&gt;<br>
&gt; On 2013-08-06, at 21:57, Bob Arning &lt;<a href="mailto:arning315@comcast.net">arning315@comcast.net</a>&gt; wrote:<br>
&gt;<br>
&gt; Well, this seems to fix it:<br>
&gt;<br>
&gt; &#39;From Squeak4.4 of 1 March 2013 [latest update: #12489] on 6 August 2013 at<br>
&gt; 3:39:29 pm&#39;!<br>
&gt;<br>
&gt; !Delay class methodsFor: &#39;snapshotting&#39; stamp: &#39;raa 8/6/2013 15:22&#39;!<br>
&gt; restoreResumptionTimes<br>
&gt;     &quot;Private!! Restore the resumption times of all scheduled Delays after a<br>
&gt; snapshot or clock roll-over. This method should be called only while the<br>
&gt; AccessProtect semaphore is held.&quot;<br>
&gt;<br>
&gt;     | newBaseTime |<br>
&gt;     newBaseTime := Time millisecondClockValue.<br>
&gt;     SuspendedDelays do: [:d | d adjustResumptionTimeOldBase: 0 newBase:<br>
&gt; newBaseTime].<br>
&gt;     ActiveDelay == nil ifFalse: [<br>
&gt;         ActiveDelay adjustResumptionTimeOldBase: 0 newBase: newBaseTime.<br>
&gt;     ].<br>
&gt;     ActiveDelayStartTime _ newBaseTime &quot;&lt;-----this&quot;! !<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Bob<br>
&gt;<br>
&gt; On 8/6/13 3:27 PM, tim Rowledge wrote:<br>
&gt;<br>
&gt; Well the timer stuff has certainly been messed about with a lot since I last<br>
&gt; had to dig into it, but it looks like it *ought* to work ok.<br>
&gt;<br>
&gt; The only likely culprit I can spot is some issue with adjusting the<br>
&gt; resumption times after the restart, but that would require some problem with<br>
&gt; the millisecond time prim.<br>
&gt;<br>
&gt;<br>
&gt; tim<br>
&gt; --<br>
&gt; tim Rowledge; <a href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" target="_blank">http://www.rowledge.org/tim</a><br>
&gt; Strange OpCodes: YVR: Branch to Vancouver<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Casey Ransberger
</div>