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

On Tue, 5 Apr 2022 10:23:45 +0200 (CEST)
Michael Van Canneyt via fpc-pascal <fpc-pascal@lists.freepascal.org>
wrote:

[...]
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.

It gives min 1, max 1000000.
I tried setting with timeBeginPeriod without effect.

Long shot...

From the docs:

Windows 8, Windows Server 2012, Windows 8.1, Windows Server 2012 R2, Windows 10 and Windows Server 2016: The dwMilliseconds value does not include time spent in low-power states. For example, the timeout does not keep counting down while the computer is asleep.

Maybe check power mode settings ?

Michael.

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

Reply via email to