Add Maximum Timeouts per Tick property to Timer #89786
Open
+49
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows Timers to be configured to emit the
timeout
signal multiple times per process or physics tick. This is useful for timers with a low wait time (< 0.05 seconds), or to ensure they stick closer to real time when framerate is highly variable.Keep in mind that high values will allow the function to be called dozens of times or more in a single frame, which can have a performance impact if the method connected to the
timeout
signal is slow.The default value is
1
to preserve existing behavior. We could perhaps consider increasing this to8
(to match the default Max Physics Steps per Frame project setting value) to improve out-of-the-box Timer usability at low wait times, but this will change behavior in some projects.Testing project: test_timer_maximum_timeouts_per_tick.zip
Preview
MTPT: Max Timeouts Per Tick
timer_max_timeouts_per_tick.mp4