Timeout#

class ignis.utils.Timeout(ms: int, target: Callable, *args)#

Calls a function after a specified time interval.

Example usage:

from ignis.utils import Utils

Utils.Timeout(ms=3000, target=lambda: print("Hello"))
property ms: int#
  • required, read-only

Time in milliseconds.

property target: Callable#
  • required, read-only

The function to call.

cancel() None#

Cancel the timeout if it is active.

This method prevents the target function from being called.

Return type:

None