class wpilib.Notifier(self: wpilib.Notifier, handler: Callable[], None]) → None

Bases: wpilib.ErrorBase

Create a Notifier for timer event notification.


handler – The handler is called at the notification time which is set using StartSingle or StartPeriodic.

setHandler(self: wpilib.Notifier, handler: Callable[], None]) → None

Change the handler function.


handler – Handler

setName(self: wpilib.Notifier, name: str) → None

Sets the name of the notifier. Used for debugging purposes only.


name – Name

startPeriodic(self: wpilib.Notifier, period: seconds) → None

Register for periodic event notification.

A timer event is queued for periodic event notification. Each time the interrupt occurs, the event will be immediately requeued for the same time interval.


period – Period to call the handler starting one period after the call to this method.

startSingle(self: wpilib.Notifier, delay: seconds) → None

Register for single event notification.

A timer event is queued for a single event after the specified delay.


delay – Amount of time to wait before the handler is called.

stop(self: wpilib.Notifier) → None

Stop timer events from occurring.

Stop any repeating timer events from occurring. This will also remove any single notification events from the queue.

If a timer-based call to the registered handler is in progress, this function will block until the handler call is complete.