Timeout#

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

Calls a function after a specified time interval.

Parameters:
  • ms (int) -- Time in milliseconds.

  • target (Callable) -- The function to call.

Example usage:

from ignis.utils import Utils

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

Time in milliseconds.

gproperty target: Callable#
  • 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