-
Notifications
You must be signed in to change notification settings - Fork 68
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
Review usage of reactor.seconds() #585
Comments
Hi, Just want to notify you guys, |
Neat, it's been a few years, was wondering if we were still on the list :) |
Hi, |
Hi, @aoengin. Sorry, it's the weekend. I am busy with other stuff. I'll get back to you on this on Monday. |
@aoengin This issue was originally created in regards to another bug, where a change between reactors caused a lot of issues because one used
World time represents the amount of time the game world has been alive. This is important for example in the instance of lag, as less time might pass in the game world than in the real world. These numbers should never be mixed. The initial issue showed that these numbers were being mixed in some cases. Hence the goal of this issue was to try to determine if there were any other of these cases. |
We would like to create tests in relation to this issue, is that possible? Would you suggest any specific way to go about it? |
There's not really any way to test this, I'm afraid? This is a wide ranging architectural issue, you can't really write tests for that. |
I figured that was the case, thanks for the quick response! |
There's many places in the code where Twisted's
reactor.seconds()
is used. However, the timestamps returned by that call are only guaranteed to be valid relative to other calls toreactor.seconds()
.The following should be done:
world_time
used for game logictime.monotonic
used for durations, such as "280 seconds"time.time
used for absolute time, such as a "Tuesday 12pm"reactor.seconds
used for times relative to the event loop, such ascall_at(time)
The text was updated successfully, but these errors were encountered: