The function to evaluate. Can be synchronous or asynchronous.
The duration for which the polling continues.
Optionalstart: StartMode = 'immediate'Determines when the polling interval starts. Default is 'immediate'.
A promise that resolves when the predicate returns true or rejects if an error occurs in the process.
Repeatedly evaluates a predicate function at a defined interval until it resolves to
trueor the timeout is reached.