"Wait until" function

Hi! I developing a game when I realised a “wait until” function would be interesting. Is there any way to do it other than (I want to use delay() with it, since it will be used in thread(""):wink:

while(condition == false) {
    delay(1000);
}

it just checks 1 every second to see if the condition is false, otherwise it exits the loop. Any other suggestions?

Hi,

There are plenty of exemple in this forum. Have a look at this thread for exemple.

And if I remember correctly @GoToLoop did some utility functions to help with that.