Is there a "Wait For" in C programming?

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.
 
Endless loop weekend calls are the best! Of course they never occur when you're at work.

can cross that off my list...
 

Similar Topics

Hi everybody, not sure if anyone else has experienced this. I have been reaching out to Rockwell Techconnect this morning to try to ask a simple...
Replies
15
Views
2,347
Fairly new to using this software. Working on making some changes with a trend client for better UI. I'm currently working on a setup where I have...
Replies
7
Views
4,583
Good Morning , Sorry for the dumb question. I need to change a WAIT time from .5 to .2 . I change it with the teach pendant, but it goes back...
Replies
6
Views
3,209
Windows 7 Enterprise RS Logix V28.02 This is a software issue, that is causing me a lot of pain in RsLogix and re-installs don't seems to be...
Replies
0
Views
1,630
Hi. I'm writing an CODESYS program with ST. In diffrent parts of my main program i need my program to pause for a while and continue running...
Replies
3
Views
10,180
Back
Top Bottom