I have this while loop in JS. It tries to do something and if it doesn't work, I want it to calculate the time it will need to wait and then reloop.
while (makeSomething() == false) {
var wait = a + b + c;
sleep(wait);
}
I only know setTimeout(), but as you might know it does not behave like I want it to do.
If jQuery offers a solution for it, that would be okay too.