See
https://github.com/techpaul/SchedulerCo-operative scheduler been tested on Due R3 using IDE 1.6.7 and Board Manager for Due 1.6.6 with some updates to avoid compiler warnings and better LCD performance as per pull request
https://github.com/arduino/Arduino/pull/4550Compile time task list with task ability to use task status for state machine in each task
Tasks can be set to have lots of custom status from error through stopped to various running states. Task Interval can be changed anytime, stopped tasks can be started from anywhere
Task logging and statistics enable time measurements of tasks, which is longest running, number of tasks run, time to perfrom task loop etc.
This is coimpile time task list generation as for Arduino environment all tasks are known at compile time and you cannot add in standard environment overlays or extra code.
Minimum loop time and other factors definable in one include file.