-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Time going backwards #25166
Comments
Just to clarify: I added |
Can't do anything if you don't give any information, I'm sorry. The issue template asks you for your OS and steps to reproduce because we need such information. |
The OS is Mac OSX. Sorry, this happens inside a complex project and I really can't make a minimal repro. |
@hedin-hiervard do you get any error in the console? Something like: |
@hedin-hiervard also, does it happens immediately, or after some time it's running? |
Refs: #26887 -- seems to happen on Windows as well. |
…bugs. On some hardware / OSes calls to timing APIs may occasionally falsely give the impression time is running backwards (e.g. QueryPerformanceCounter). This can cause bugs in any Godot code that assumes time always goes forwards. This PR simply records the previous time returned by the OS, and returns the previous time if the new time is earlier than the previous time. May fix godotengine#31837, godotengine#25166, godotengine#27887.
…bugs. On some hardware / OSes calls to timing APIs may occasionally falsely give the impression time is running backwards (e.g. QueryPerformanceCounter). This can cause bugs in any Godot code that assumes time always goes forwards. This PR simply records the previous time returned by the OS, and returns the previous time if the new time is earlier than the previous time. May fix godotengine#31837, godotengine#25166, godotengine#27887.
To anyone that can reproduce the original issue The patch just tries to avoid some unnecessary math, limiting potential overflows and hopefully minimizing numerical errors: (there is also a 3.1 version of this patch: https://github.com/Faless/godot/tree/spike/clock_info_3.1 ) |
Can anyone still reproduce this bug in Godot 3.2.3 or any later release? If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop. |
Godot version:
3.1 beta2
Issue description:
See the screenshot attached.
The text was updated successfully, but these errors were encountered: