The function executed to verify a particular condition until it's passed
The function executed when checkCallback returns true or some object
The function executed when checkCallback has failed for too long (went over the timeout)
The duration in milliseconds until the task is aborted (defaults to 10 seconds)
The frequency in milliseconds to callback for a check (defaults to 100 milliseconds)
This generic function checks for a validity of something via the checkCallback() until it's found or until the timer runs out. When the check callback returns true (or some found object), the doCallback() function is called with the found information. If checkCallback wasn't found and timer expired, the failCallback() function is called.