1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resolved delayUntil() boolean returns?

Discussion in 'Developer Support' started by NZL, May 18, 2016.

  1. NZL

    NZL

    Joined:
    Dec 3, 2015
    Messages:
    22
    Likes Received:
    0
    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
     
  2. Best Answer:
    Post #2 by SlashnHax, May 18, 2016
  3. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,216
    Likes Received:
    1,043
    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
     
    #2 SlashnHax, May 18, 2016
    Last edited: May 18, 2016
    NZL likes this.

Share This Page

Loading...