Beta
Creates a generic poller
the poller
An asynchronous function that will be executed periodically by the poller.
The interval, in milliseconds, at which the callback should be executed.
Creates a poller that executes its callback based on the users idle status
the poller
An asynchronous function that will be executed periodically by the poller based on the users idle status.
The interval, in milliseconds, at which the callback should be executed.
Optional
idleState: IdleStateThe idle state when the poller is active. When set to
active
, the poller will only execute while the user is actively using
the application. When set to idle
, the poller will only execute while
the user is idle. Default value is active
.
Factory for creating pollers.
Example