-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
OS.get_system_time_msecs output is wrong #44533
Comments
I'm unable to reproduce this on Debian 10.7 ( Out of curiosity, what do you get if you run |
This: recording.mp4 |
I also can't reproduce but with Ubuntu 20.04 |
Yes I'm sure. I didn't change any project settings, you can check in the project I uploaded. |
I ran a test on my laptop (also running Arch Linux) and got this result: godot-screencast.mp4Does this look right? |
This is fixed by: #39189 . Also, don't use |
How does that pull request fix it not updating correctly? Replacing the |
Oh, my bad I didn't read the description well, and thought you were on Windows (which had a broken
This is really weird, |
recording.mp4 |
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: Lines 2064 to 2068 in 31d0f8a
I then managed to reproduce a similar output by executing the following snippet with # main.gd
extends MainLoop
func _iteration(delta: float) -> bool:
print(OS.get_system_time_msecs())
return false Output:
So the question now is: what is limiting the FPS? |
Interesting. Have any ideas of what I can test to figure it out? |
why do you keep using |
What are you talking about? The last output I posted was from |
I was referring to @Demindiro 's last test. Anyway, as @Demindiro mentioned, what you are seeing might be the side effect of the way EDIT: The recording application might be causing the FPS drop I guess, but I assume you are seeing the issue even when not recording? |
Sure.
I'm getting some really bizarre numbers if I print
Yeah, I am. |
@poperigby this likely confirms you have some driver issues, with those specs, you definitively should not have problems reaching 60FPS in an empty scene. One thing you can try is disabling vsync and see if that's an issue with your setup ( |
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 |
Closing, as the discussion will move over to #44741. |
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:recording.mp4
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:
SystemTimeTest.zip
The text was updated successfully, but these errors were encountered: