Skip to content
Version 2.11.0
↓ Get the launcher

IFrameworkTiming.Every method

Registers a recurring callback fired at most once per interval, downsampled from this plugin’s Update tick (so it never runs faster than the plugin ticks). Dispose the returned scope to cancel. Replaces the hand-rolled _accum += dt; if (_accum >= period) idiom.

public IDisposable Every(TimeSpan interval, Action action)
parameter description
interval Minimum time between invocations.
action Work to run each interval; exceptions are swallowed.