utilities.FunctionRepeater

Repeats a function every interval. Ref: https://tinyurl.com/yckgv8m2

Usage

Source

utilities.FunctionRepeater(
    interval,
    function,
    *args,
    **kwargs,
)

Methods

Name Description
__init__() Initialize FunctionRepeater class.
start() Start the function repeater.
stop() Stop the function repeater.

__init__()

Initialize FunctionRepeater class.

Usage

Source

__init__(interval, function, *args, **kwargs)
Parameters
interval: float | int

Time interval in seconds between function calls.

function: callable

The function to repeat.

args: tuple = ()

Positional arguments to pass to the function.

kwargs: dict = {}
Keyword arguments to pass to the function.

start()

Start the function repeater.

Usage

Source

start()

stop()

Stop the function repeater.

Usage

Source

stop()