Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved delayUntil() boolean returns?

nzl

Joined
Dec 3, 2015
Messages
22
Execution.delayUntil(() -> countA > countB, 3000, 5000);

What are the signals this outputs?
countA > countB - Immediately returns true?
wait 3000-5000 returns false? or true?

For example
count cooked food every loop, if currentcooked > countedcooked while waiting for 3-5seconds, return true
so that I know I am still cooking
 
Joined
Dec 10, 2014
Messages
3,332
It returns true if the callable returns true within the specified time period, else it times out and returns false.

There's an overload that takes a second callable, while resets the timer
 
Last edited:
Top