The Arduino cannot multi-task, so time has to be giving to the tasks in some order as determined by your code.