New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[no squash] porting.h maintenance #14095
Conversation
- correctly use value of _POSIX_MONOTONIC_CLOCK - drop special path for macOS: it supports clock_gettime since macOS 10.12
Using self-compiled MinGW build on Windows 10,
In some cases, the Minetest's FPS counter is lower (by around 1 FPS) than the Xbox Game Bar's FPS info using this PR version. |
Hm. |
Some debugging code to add to auto start = getTimeUs();
WaitForSingleObject(timer, INFINITE);
auto end = getTimeUs();
if (fabs(fabs(end-start) - usecs) > 100) {
char buf[100];
snprintf(buf, 100, "wanted to sleep %dus actually %dus", (int)usecs, (int)fabs(end-start));
actionstream << buf << std::endl;
}
CloseHandle(timer); I sometimes see it sleeping up to double the requested time for small amounts like 1000. It's weird because |
Well I've run out of things to try so I'll convert this PR to only the maintenance changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me. I can not test on other than Windows, though.
To do
This PR is Ready for Review.
How to test
no need really