<p></p>
<p>I'm just starting to get familiar with this repository, and I found out something interesting: On Windows, the timestamps of DND (drag and drop) events received from the VM differ by loads from the timestamps of mouse move events. For example, I recorded some event sequences where the former were circa <code>7140</code>, and the latter, just recorded a few seconds later, were <code>21276406</code>. In other cases, the difference I measured was about 57 seconds, not sure whether cause or coincidence.</p>
<p>Looking into <code>sqWin32Window.c</code>, this may be caused by the fact that <code>recordDragDropEvent()</code> calls <code>ioMicroMSecs()</code> which calls <code>timeGetTime()</code> from <code>timeapi.h</code> and trims the result to fit into a <code>SmallInteger</code>. On the contrary, <code>recordMouseEvent()</code>, and so <code>recordMouseDown()</code>, <code>recordKeyboardEvent()</code>, and others called from <code>MainWndProcW()</code>, use <code>GetMessageTime()</code> from <code>winuser.h</code> as time stamp which is not truncated, too.</p>
<p>Do we indeed need to use two different approaches, two different APIs here? This is very impractical for me as I cannot compare the timestamp of events from different sources. Would it be possible to decide for one API and one byte count? Looking forward to your feedback!</p>
<h2>Related sources</h2>
<ul>
<li>Besides the SmallInteger truncation, lags between timestamps from both different APIs appear to be a known problem: <a href="https://stackoverflow.com/questions/48813245/lag-between-gettickcount-and-timegettime-changes-between-executions-of-my-te" rel="nofollow">StackOverflow - Lag between GetTickCount() and timeGetTime() changes between executions of my test program</a></li>
<li>A similar issue already has been reported on the squeak-vm list here: <a href="http://forum.world.st/win32-Morphic-event-timeStamp-bug-td4824244.html" rel="nofollow">[squeak-vm] [win32] Morphic event timeStamp bug<br>
</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/issues/509">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEWY5TGMZXR6KVOCXMXTRWKFZ3ANCNFSM4N4T7QEA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEW6PEUB7NPTBIUSZDCLRWKFZ3A5CNFSM4N4T7QEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JQG5NHA.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/issues/509",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/509",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>