Forum > Networking and Web Programming

cannot receive messages; udp server with lnet

<< < (43/44) > >>

Warfley:
You are right, that is defenetly not an exotic CPU.
If you are using Hyper-V VMs than this could be the issue, because this is where I have the exact same behavior when starting a Hyper-V VM.

rvk:

--- Quote from: Warfley on July 14, 2022, 12:55:23 pm ---If you are using Hyper-V VMs than this could be the issue, because this is where I have the exact same behavior when starting a Hyper-V VM.

--- End quote ---
In my Hyper-V Win10, (checking version... 21H2, so later than 2004) I still have long sleep(1) of 15ms.

Not sure why you have faster results in your Hyper-V.

Is there a method to query the current setting/value (the one which TimeBeginPeriod changes)??
Maybe some default setting in registry or otherwise is set.

Warfley:
Maybe with ExSetTimerResolution (thin wrapper around the NT call): https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-exsettimerresolution if SetResolution is false it should return the current resolution

PascalDragon:

--- Quote from: Warfley on July 14, 2022, 01:17:40 pm ---Maybe with ExSetTimerResolution (thin wrapper around the NT call): https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-exsettimerresolution if SetResolution is false it should return the current resolution

--- End quote ---

Ex* functions are only available from kernel mode. Either use what is provided from the Windows API or use the Nt* function (despite not documented they're very stable as well).

Warfley:
Ah you are right, I confused them with the FunctioNameEx functions.
The API for this is https://docs.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timegetdevcaps

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version