Utils module

class utils.Timer(callback)[source]

Bases: object

A class that provides an asynchronous timer, to schedule a function execution.

__init__(callback)[source]
async _job(timeout)[source]
cancel() None[source]

Cancel the tasks if exists.

start(timeout: int) None[source]

Starts the timer and schedule the callback call.

Parameters

timeout – in seconds, time to wait