poll()
Periodically tests for a condition to be met before executing some code.
This function is valid in v2.1.0 to v2.24.3. This function has been downloaded 60 times.opt_interval
until it returns a true
-ish value or the opt_timeout
time elapses. The arguments passed will be (1) a prevention function that when called will prevent further tests from occurring and (2) the number of times this function was called. Calling the prevention function will only prevent subsequent polls from happening, it will not indicate that the test was a success or failure.fnTest
evaluates to a true
-ish value. The arguments passed will be (1) the return value from the success call to fnTest
and (2) the number of times fnTest
was called.100
Infinity
fnTest
was a success.