public interface Timer extends MetaWearBoard.Module
Modifier and Type | Interface and Description |
---|---|
static interface |
Timer.Controller
Timer controller for managing the task execution
|
static interface |
Timer.Task
Task that can be scheduled for periodic execution
|
Modifier and Type | Method and Description |
---|---|
Timer.Controller |
getController(byte controllerId)
Retrieve the controller corresponding to the ID
|
void |
removeTimers()
Removed all timers from the board.
|
AsyncOperation<Timer.Controller> |
scheduleTask(Timer.Task mwTask,
int period,
boolean delay)
Schedules a task to be periodically executed indefinitely
|
AsyncOperation<Timer.Controller> |
scheduleTask(Timer.Task mwTask,
int period,
boolean delay,
short repetitions)
Schedules a task to be periodically executed for a fixed number of times
|
AsyncOperation<Timer.Controller> scheduleTask(Timer.Task mwTask, int period, boolean delay)
mwTask
- Task to be scheduleperiod
- How often to execute the task, in millisecondsdelay
- True if the first execution should be delayed by one period
worth of timeAsyncOperation<Timer.Controller> scheduleTask(Timer.Task mwTask, int period, boolean delay, short repetitions)
mwTask
- Task to be scheduleperiod
- How often to execute the task, in millisecondsdelay
- True if the first execution should be delayed by one period
worth of timevoid removeTimers()
Timer.Controller getController(byte controllerId)
controllerId
- Controller ID to lookup