Hi Louis,<br><br><div class="gmail_quote">On Wed, Aug 8, 2012 at 1:12 PM, Louis LaBrunda <span dir="ltr">&lt;<a href="mailto:Lou@keystone-software.com" target="_blank">Lou@keystone-software.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hi VM Guys,<br>
<br>
How does Squeak&#39;s Time&gt;millisecondClockValue get a resolution of 1<br>
millisecond?  It is primitive: 135.  I thought it was based upon an OS<br>
function that kept a millisecond clock from when the OS was booted like in<br>
my case for Windows GetTickCount.  The resolution of the GetTickCount<br>
function is limited to the resolution of the system timer, which is<br>
typically in the range of 10 milliseconds to 16 milliseconds.<br>
<br>
On my machine with VA Smalltalk the resolution seems to be about 15<br>
milliseconds.  Yet, in Squeak it is 1 millisecond.  So it would seem the<br>
Squeak VM is using something else.<br></blockquote><div><br></div><div>Well, things are different across platforms, and different between the Cog and the Interpreter VMs.  But on WIndows millisecond time is derived from timeGetTime, which answers milliseconds since Windows booted.  The different between Cog and the Interpreter is that the Interpreter accesses timeGetTime directly to answer milliseconds, whereas Cog updates the time in a background thread every 1 or two milliseconds, and answers the saved value.  So you may see the effective resolution in Cog be only 2 milliseconds, not 1.</div>
<div><br></div><div>HTH</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>
Lou<br>
-----------------------------------------------------------<br>
Louis LaBrunda<br>
Keystone Software Corp.<br>
SkypeMe callto://PhotonDemon<br>
mailto:<a href="mailto:Lou@Keystone-Software.com">Lou@Keystone-Software.com</a> <a href="http://www.Keystone-Software.com" target="_blank">http://www.Keystone-Software.com</a><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>