On Tue, 5 Apr 2022, Mattias Gaertner via fpc-pascal wrote:

Hi Michael,

Under Linux a RTLEventWaitFor(e,1) usually waits at most 1ms. But under
Windows it usually waits at least 15ms. It seems to round to nearest
1/64 of a second.

Googling this lead me to question the sanity of some bloggers.

Has anyone an idea if this is normal on Windows and if there is an
alternative?

RTLEventWaitFor uses WaitForSingleObject internally.

According to this:

https://docs.microsoft.com/en-gb/windows/win32/sync/wait-functions

The system clock (and not some high-performance counter) is used to determine
resolution of the timeout. You could call timeGetDevCaps to check the 
resolution.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to