<p>As of today, if the Windows system time is changed, already running VM instances will not reflect this change. With this patch, this bug is fixed. The full bug report is on squeak-dev: <a rel="nofollow" href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-June/215908.html">http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-June/215908.html</a></p>
<p>This bug only affects builds for Windows versions prior to Windows 8, never builds do not use the tick variables any longer. See:</p>
<p><div class="border rounded-1 my-2">
  <div class="f6 px-3 py-2 lh-condensed border-bottom color-bg-secondary">
    <p class="mb-0 text-bold">
      <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/57260c215c025e17b57e0b7d8478edbcddb74407/platforms/win32/vm/sqWin32Heartbeat.c#L79-L85">opensmalltalk-vm/platforms/win32/vm/sqWin32Heartbeat.c</a>
    </p>
    <p class="mb-0 color-text-tertiary">
        Lines 79 to 85
      in
      <a data-pjax="true" class="commit-tease-sha" href="/OpenSmalltalk/opensmalltalk-vm/commit/57260c215c025e17b57e0b7d8478edbcddb74407">57260c2</a>
    </p>
    </div>
    <div itemprop="text" class="blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L79" class="blob-num border-0 px-3 py-0 color-bg-primary js-line-number" data-line-number="79"></td>
          <td id="LC79" class="blob-code border-0 px-3 py-0 color-bg-primary blob-code-inner js-file-line"> #<span class="pl-k">if</span> (_WIN32_WINNT >= _WIN32_WINNT_WIN8) </td>
        </tr>

        <tr class="border-0">
          <td id="L80" class="blob-num border-0 px-3 py-0 color-bg-primary js-line-number" data-line-number="80"></td>
          <td id="LC80" class="blob-code border-0 px-3 py-0 color-bg-primary blob-code-inner js-file-line">  </td>
        </tr>

        <tr class="border-0">
          <td id="L81" class="blob-num border-0 px-3 py-0 color-bg-primary js-line-number" data-line-number="81"></td>
          <td id="LC81" class="blob-code border-0 px-3 py-0 color-bg-primary blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">/*</span> Compute the current VM time basis, the number of microseconds from 1901.</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L82" class="blob-num border-0 px-3 py-0 color-bg-primary js-line-number" data-line-number="82"></td>
          <td id="LC82" class="blob-code border-0 px-3 py-0 color-bg-primary blob-code-inner js-file-line"> <span class="pl-c"> *</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L83" class="blob-num border-0 px-3 py-0 color-bg-primary js-line-number" data-line-number="83"></td>
          <td id="LC83" class="blob-code border-0 px-3 py-0 color-bg-primary blob-code-inner js-file-line"> <span class="pl-c"> * As of Windows 8 there is a FILETIME wall clock interface which is high</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L84" class="blob-num border-0 px-3 py-0 color-bg-primary js-line-number" data-line-number="84"></td>
          <td id="LC84" class="blob-code border-0 px-3 py-0 color-bg-primary blob-code-inner js-file-line"> <span class="pl-c"> * precision and so does not have to be combined with the millisecond clock.</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L85" class="blob-num border-0 px-3 py-0 color-bg-primary js-line-number" data-line-number="85"></td>
          <td id="LC85" class="blob-code border-0 px-3 py-0 color-bg-primary blob-code-inner js-file-line"> <span class="pl-c"> <span class="pl-c">*/</span></span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
</p>
<p>(However, as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="616402806" data-permission-text="Title is private" data-url="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/499" data-hovercard-type="pull_request" data-hovercard-url="/OpenSmalltalk/opensmalltalk-vm/pull/499/hovercard" href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/499">#499</a> is still unmerged, currently, also builds for Windows 10 are affected by the bug. Looks like we were never benefitting from <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/eliotmiranda/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eliotmiranda">@eliotmiranda</a>'s improvements for the Win8 APIs (cf. <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/fae0d31cd52341977d37d150d8d2c9272f9864bf/hovercard" href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/fae0d31cd52341977d37d150d8d2c9272f9864bf"><tt>fae0d31</tt></a>) until today <g-emoji class="g-emoji" alias="laughing" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f606.png">😆</g-emoji>)</p>
<p>Independently of this patch, we will want to fix cross-platform-occurring VM hangs when the system clock is pulled backward. See the bug report on squeak-dev for this, again.</p>
<p>Please review thoroughly!</p>
<p>/cc <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/marceltaeumel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/marceltaeumel">@marceltaeumel</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/588'>https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/588</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>windows: resync the VM time when the system clock gets changed</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/588/files#diff-1c1065ffddbda702e783bb4fc291d1a20499f3fbf417ba1e763d31c8826adec5">platforms/win32/vm/sqWin32Heartbeat.c</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/588/files#diff-641fb6594d8d6305d64b01ec0601b941b5bedc6f99a01e656abca25941507392">platforms/win32/vm/sqWin32Window.c</a>
    (4)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/588.patch'>https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/588.patch</a></li>
  <li><a href='https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/588.diff'>https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/588.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/588">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW7PURQYBPRGCXG2BZDT7QA6TANCNFSM5DCZ3TBA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AIJPEW5UHZUQ7TIPWSRI54TT7QA6TA5CNFSM5DCZ3TBKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4OU3LWNQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/588",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/588",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>