-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Clarify timer precision in docs #2009
Conversation
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.
Even though this is an implementation detail, it's a common source of confusion, so worth adding a note. Thank you!
* | ||
* @param interval Interval from the current game time to execute the given function. | ||
* Timer intervals are rounded to the nearest tenth of a second. |
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.
"rounded up"? might as well be explicit when we add a note.
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.
Honestly, after talking about it in the SM discord, I still don't quite understand what is going on with timer precision - as far as I know, it just executes on a think every 100ms, but a global think and not a per timer think?
It's driven by the framerate, so it's not super accurate or precise.On Jun 30, 2023 11:20 PM, sappho ***@***.***> wrote:
@sapphonie commented on this pull request.
In plugins/include/timers.inc:
*
* @param interval Interval from the current game time to execute the given function.
+ * Timer intervals are rounded to the nearest tenth of a second.
Honestly, after talking about it in the SM discord, I still don't quite understand what is going on with timer precision - as far as I know, it just executes on a think every 100ms, but a global think and not a per timer think?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Closing in favor of #2014 , will reopen if that PR fails |
Common footgun, should be clarified