>>>It is case sensitive. I just typed it in and tryed it
>>>*---------------------------------
>>>Declare Sleep in Win32API Integer
>>>=Sleep(100)
>>>*---------------------------------
>>>
>>>Charles
>>>
>>>>>You could use the Sleep API
>>>>>
>>>>>DECLARE Sleep IN WIN32API INTEGER
>>>>>
>>
>>
>>Chuck,
>>
>>further to my testing:
>>The sleep API puts a thread to sleep for the specified miliseconds. My problem is this:
>>
>>My app uses a timer to poll some hardware connected to the com port continuously! Since this polling needs to wait for a reply from the hardware, I need a wait or pause in the polling loop. If data is returned then I break the loop and update the screen. Then the timer fires and I poll again. This is in real time.
>>
>>While all this is going on other timers are firing doing other things and users can enter data or requested input on forms. The "poll" timer just updates one label on the screen.
>>
>>PROBLEM with Sleep API is it puts ALL the processes to sleep for the period specified not only the poll loop it is called in. I tried this with a form with 2 timers, one having a sleep in its Timer event. When this timer fired VFP went to sleep!!!
>>
>>So this will not do.
>>
>>I need a statement like PAUSE or some such to work.
>>
>>I tried INKEY(.3,"H") but this can be interrupted with keystrokes and still eats keys.
>>
>>Any other ideas??
>>
>>Bernard
>
>You could try this. You would have to trap for Midnight because Seconds() starts over at midnight
>
>ln_seconds = SECONDS()
>DO WHILE SECONDS() - ln_seconds < .1
>ENDDO
>
>Charles
Charlie baby
Have you ever tried a loop like that in VFP. It will hog the resources completely so that you will not be able to do ANYTHING else!!
Bernard