Depending on how wait is implemented we could get 000 or 001.
Edit: I’m inclined to think it would be 000, aka all wait 0 after a wait will be run. The logic may be similar to the following. If I wanted it to delay to next frame it would be more complex I’d imagine. We could always look at the c2 source to see how wait is implemented too.
waitlist = []
time = 0
function wait(t){
waitlist.append({when:time+t, events:followingEvents})
}
while(gameRunning){
time += dt
runEvents()
for(i=0; i<waitlist.length; ++i){
if(waitlist[i].when<=time){
run(waitlist[i].events)
waitlist.remove(i)
i-=1
}
}
}