Method AddTimeout
AddTimeout(TimeSpan, Func<bool>)
Adds a timeout to the application.
object AddTimeout(TimeSpan time, Func<bool> callback)
Parameters
timeTimeSpanThe time span to wait before invoking the callback.
callbackFunc<bool>The callback to invoke. If it returns true, the timeout will be reset and repeat. If it returns false, the timeout will stop and be removed.
Returns
- object
Call RemoveTimeout(object) with the returned value to stop the timeout.
Remarks
When the time specified passes, the callback will be invoked on the main UI thread.
Shutdown() calls StopAll on TimedEvents to remove all timeouts.