API

The API consist of Timer class, which object represents asynchronous timer.

class atimer.Timer(interval: float)[source]

Timer based on Linux timerfd interface.

Timer object is a Python asynchronous coroutine. It waits for timer expiration. An awaited coroutine returns number of timer expirations.

The number of expirations is usually 1 until timer overrun happens. Refer to POSIX documentation for definition of the timer overrun.

Parameters:

interval – Interval, in seconds, at which the timer expires.

close() None[source]

Stop and disarm the timer.

start() None[source]

Arm the timer.