public interface Timer extends MetaWearBoard.Module
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Timer.ScheduledTask
A task comprising of MetaWear commands programmed to run on-board at a certain times
|
| Modifier and Type | Method and Description |
|---|---|
Timer.ScheduledTask |
lookupScheduledTask(byte id)
Find the
Timer.ScheduledTask object corresponding to the given id |
Task<Timer.ScheduledTask> |
scheduleAsync(int period,
boolean delay,
CodeBlock mwCode)
Schedule a task to be indefinitely executed on-board at fixed intervals
|
Task<Timer.ScheduledTask> |
scheduleAsync(int period,
short repetitions,
boolean delay,
CodeBlock mwCode)
Schedule a task to be executed on-board at fixed intervals for a specific number of repetitions
|
Task<Timer.ScheduledTask> scheduleAsync(int period, boolean delay, CodeBlock mwCode)
period - How often to execute the task, in millisecondsdelay - True if first execution should be delayed by one delaymwCode - MetaWear commands composing the taskTimer.ScheduledTaskTask<Timer.ScheduledTask> scheduleAsync(int period, short repetitions, boolean delay, CodeBlock mwCode)
period - How often to execute the task, in millisecondsrepetitions - How many times to execute the taskdelay - True if first execution should be delayed by one delaymwCode - MetaWear commands composing the taskTimer.ScheduledTaskTimer.ScheduledTask lookupScheduledTask(byte id)
Timer.ScheduledTask object corresponding to the given idid - Task id to lookup