cardosocea
Member
But in seriousness, for C waitFor is done like this
while ( !inPos )
{
// do nothing
}
Came late to the thread and others have pointed the mistake with this approach.
In C programming, if possible (which is not very common), you would always add a timeout in that while loop.
Either by adding a variable that gets incremented inside the while or by taking the time it first arrived at that point and compare it against the system's clock.