Hi!
We identified a bug concerning either the #timeStamp in MorphicEvent objects or Time >> #millisecondClockValue.
Inspecting the result of "ActiveEvent timeStamp - Time millisecondClockValue" returns a suspiciously high number. 21373801 on my last try.
So, the primitive 135, which is used for #millisecondClockValue, points (cointerp.c) to ioMSecs(). For Windows this is "GetTickCount() &0x3FFFFFFF;" (sqWin32Time.C).
Then, the keyboard event (here: CMD+P) gets its timeStamp assigned from the MSG structure in sqWin32Window.c, which is good:
int recordKeyboardEvent(MSG *msg) { ... evt->timeStamp = msg->time; ... }
((( Only for drag/drop events into the VM, it uses ioMicroMSecs() [cointerp.c], which is timeGetTime() and has a higher accuracy. )))
The MSDN says this: MSG structure https://msdn.microsoft.com/en-us/library/windows/desktop/ms644958%28v=vs.85%... GetTickCount() https://msdn.microsoft.com/en-us/library/windows/desktop/ms724408%28v=vs.85%... GetMessageTime() https://msdn.microsoft.com/en-us/library/windows/desktop/ms644939%28v=vs.85%...
And some interesting discussions about msg->time vs. GetMessageTime() : http://blogs.msdn.com/b/oldnewthing/archive/2014/01/22/10491576.aspx
Some ideas/questions:
- Why isn't the MillisecondClockMask applied to the message time as in sqMacUIEvents.c ? - Hmmmm....
Best, Marcel & Bert
-- View this message in context: http://forum.world.st/win32-Morphic-event-timeStamp-bug-tp4824244.html Sent from the Squeak VM mailing list archive at Nabble.com.