unsigned long getTaskPeriod(int id)
id | : | Task identifier for the task |
---|
This function returns the current scheduling interval for the specified task. The scheduling interval is the time in milliseconds between successive executions of the task function.
Returns task scheduling interval in milliseconds.
The Task Management Functions are specific to ChipKit and exceed the Arduino 1.6.x specification.
int blink_id;
unsigned long blink_period;
unsigned long blink_var;
void blink_task(int id, void * tptr) {
digitalWrite(led, !digitalRead(led); // Toggle pin state
}
void setup() {
pinMode(led, OUTPUT);
blink_id = createTask(blink_task, 200, TASK_ENABLE, &blink_var);
blink_period = getTaskPeriod( blink_id);
}
createTask(), destroyTask(), getTaskId(), getTaskNextExec(), getTaskPeriod(), getTaskState(), getTaskVar(), setTaskPeriod(), setTaskState(), setTaskVar(), startTaskAt(),