General Timed Loop (non-RTOS)