Table of Contents

Method AddTimeout

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

AddTimeout(TimeSpan, Func<MainLoop, bool>)

Adds a timeout to the mainloop.

public object AddTimeout(TimeSpan time, Func<MainLoop, bool> callback)

Parameters

time TimeSpan
callback Func<MainLoop, bool>

Returns

object

Remarks

When time specified passes, the callback will be invoked. If the callback returns true, the timeout will be reset, repeating the invocation. If it returns false, the timeout will stop and be removed.

The returned value is a token that can be used to stop the timeout by calling RemoveTimeout(object).