<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 4, 2014 at 2:37 PM, Sven Van Caekenberghe <span dir="ltr">&lt;<a href="mailto:sven@stfx.eu" target="_blank">sven@stfx.eu</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 04 Mar 2014, at 22:34, Max Leske &lt;<a href="mailto:maxleske@gmail.com">maxleske@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Phew! I already thought I was crazy :)<br>
&gt;<br>
&gt; In that case here are two more tidbits:<br>
&gt; - I tried to log &lsquo;DateAndTime now&rsquo; in a different test simultaneously. The timestamp produced there was different, suggesting that the clock does move from time to time.<br>
&gt; - FileSystemTests&gt;&gt;testEntryAt exhibits that problem. But the tests run on the main Pharo machines are fine (that&rsquo;s why I thought it might be the system clock).<br>
&gt; - the same test only fails in the Pharo3 image, not in Pharo2, but both use the stable PharoVM for building.<br>
<br>
There is a big difference in how DateAndTime class&gt;&gt;#now works in 2.0 vs 3.0. The former uses #millisecondClockValue while the latter uses #microsecondClockValue. Furthermore 2.0 does all kind of crazy stuff with a loop and Delays to try to improve the accuracy, we threw all that out.<br>

<br>
Yeah, I guess the clock is just being updated slowly, maybe under heavy load. The question is where that happens. I think in the virtualised OS.<br></blockquote><div><br></div><div>That makes sense. &nbsp;In the VM the microsecond clock is updated on every heartbeat and the heartbeat should be running at about 500Hz. &nbsp;Can anyone with hardware confirm that in 3.0 the time on linux does indeed increase at about 500Hz?</div>
<div><br></div><div>Note that even in 2.0 the time is being derived from the same basis. &nbsp;In Cog, the effective time basis is the 64-bit microsecond clock maintained by the heartbeat and even the secondClock and millisecondClock are derived from this. &nbsp;So its still confusing why there should be such a difference between 2.0 and 3.0.</div>
<div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
&gt; Hope that helps.<br>
&gt;<br>
&gt; On 04.03.2014, at 22:10, Sven Van Caekenberghe &lt;<a href="mailto:sven@stfx.eu">sven@stfx.eu</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Hey Max,<br>
&gt;&gt;<br>
&gt;&gt; Great catch, I saw some weird stuff too, and we had this conversation :<br>
&gt;&gt;<br>
&gt;&gt;&gt; may be just =<br>
&gt;&gt;&gt; and time does not pass fast enough/<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On 03 Mar 2014, at 22:22, <a href="mailto:no-reply@ci.inria.fr">no-reply@ci.inria.fr</a> wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; <a href="https://ci.inria.fr/pharo/job/Pharo-3.0-Update-Step-2.1-Validation-A-L/label=linux-stable-worker/962/" target="_blank">https://ci.inria.fr/pharo/job/Pharo-3.0-Update-Step-2.1-Validation-A-L/label=linux-stable-worker/962/</a><br>

&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 1 regressions found.<br>
&gt;&gt;&gt;&gt;&gt; KernelTests.Chronology.DateAndTimeTest.testMonotonicity<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; How the hell can this fail ?<br>
&gt;&gt;&gt;&gt; The clock moving backwards ??<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; testMonotonicity<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp;| t1 t2 t3 t4 |<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp;t1 := DateAndTime now.<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp;t2 := DateAndTime now.<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp;(Delay forMilliseconds: 1000) wait.<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp;t3 := DateAndTime now.<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp;t4 := DateAndTime now.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp;self<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;assert: (t1 &lt;= t2);<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;assert: (t2 &lt; t3);<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;assert: (t3 &lt;= t4).<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; So you proofed Stef&#39;s assumption of time standing still ;-)<br>
&gt;&gt;<br>
&gt;&gt; But there were earlier problems as well.<br>
&gt;&gt;<br>
&gt;&gt; Thx !<br>
&gt;&gt;<br>
&gt;&gt; On 04 Mar 2014, at 21:43, Max Leske &lt;<a href="mailto:maxleske@gmail.com">maxleske@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; There seems to be a problem on <a href="http://pharo-contribution-linux64-4.ci.inria.fr" target="_blank">pharo-contribution-linux64-4.ci.inria.fr</a> AFAICT. I can reproduce the following to phenomena:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 1. &#39;(Delay forSeconds: 10) wait&rsquo; does not wait.<br>
&gt;&gt;&gt; 2. &lsquo;DateAndTime now&rsquo; does not change for long intervals.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; For instance, the following code:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; (FileSystem disk workingDirectory / &#39;foo.log&#39;) writeStreamDo: [ :stream |<br>
&gt;&gt;&gt; &nbsp; &nbsp; stream nextPutAll: DateAndTime now asString;crlf.<br>
&gt;&gt;&gt; &nbsp; &nbsp; stream nextPutAll: ([(Delay forSeconds: 10) wait] timeToRun / 1000) asString; crlf.<br>
&gt;&gt;&gt; &nbsp; &nbsp; stream nextPutAll: DateAndTime now asString ].<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; produces this output:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 2014-03-04T21:32:21.396669+01:00<br>
&gt;&gt;&gt; 0:00:00:00<br>
&gt;&gt;&gt; 2014-03-04T21:32:21.396669+01:00<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Too me (and my untrained eye) this looks like a system clock problem. Could somebode take a look at the server in question?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt; Max<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>