I discovered there is also the sleep-precision setting you can increase the value of in Config.prc. It will make Panda subtract this amount (in seconds) from the amount of time it sleeps, and then continues to busy-wait until the requested time has been reached.
I could reproduce the problem, the default sleep-precision of 0.01 (10ms) is inadequate and causes frequent oversleeping.
Raising sleep-precision (to over 0.016) will fix your problem, but it’s also not great because it will cause Panda to busy-wait for even longer, consuming unnecessary CPU resources.
So, I checked in a change so that Panda3D 1.11.0 will use a high-precision timer (available as of Windows 10 version 1803), making it possible to lower sleep-precision down to 0.001 without causing oversleeping.
Thanks for pointing this out, this comes timely for me. ‘sleep-precision 0.001’ (1 ms) works very well on MacOS and it reduces CPU consumption drastically. Before, I tried implementing a frame rate limiter with base.setSleep() but it proved impossible to get a consistent framerate.