Function scheduler for Arduino with milli-second resolution