There is my MR for that from a year ago: https://gitlab.winehq.org/wine/wine/-/merge_requests/2463. It didn't get much attention for some reason although the specific issue it was back then motivated by was fixed in Wine Gecko.
There are functional differences between my MR and this one which I suppose are important: - sleep time should not depend on the last DwmFlush() call time. Failing to know (or have) the actual next composition update time I think it is better to stick to synthetic equal intervals (my patch just rounds the QPC time to estimate the next period end); - Sleep() is probably too coarse with 1ms granularily.