godot: OS.get_system_time_msecs output is wrong
Godot version:
3.2.3
OS/device including version:
OS: Arch Linux
Issue description:
When running OS.get_system_time_msecs() in _physics_process(), it seems to be counting incorrectly. The last three numbers will stay the same for multiple lines before flipping even though they’re supposed to be milliseconds. It’s hard to describe, so here’s a video of it happening:
Also, I’m not positive, but I think this might be causing some serious network sync latency issues, because my solution uses this function to sync the world state.
Steps to reproduce:
Put print(OS.get_system_time_msecs()) in _physics_process()
Minimal reproduction project:
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (3 by maintainers)
After disabling v-sync, my FPS starts out at one and climbs to 5 digits.
I can run GL applications well. I can even run Godot applications very well.
Also, in that game, unfocusing the game window made it drop down to 1, but refocusing it made it climb back up to 60. I’m starting to think that it has something to do with unfocusing the window. That’s what my new issue will be about.
Edit: #44741 is the new issue
So it just occurred to me that roughly the same output is printed exactly 8 times per iteration, which reminded me of this particular piece of code:
https://github.com/godotengine/godot/blob/31d0f8ad8d5cf50a310ee7e8ada4dcdb4510690b/main/main.cpp#L2064-L2068
I then managed to reproduce a similar output by executing the following snippet with
godot --frame-delay 1000 -s main.gdOutput:
So the question now is: what is limiting the FPS?