Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer within a timer?
Message
From
07/11/2001 08:51:46
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgia, United States
 
 
To
06/11/2001 18:46:33
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00578290
Message ID:
00578448
Views:
17
>Thanks for the reply Gerald. I am working on a program that copies files from a specified directory into a table. Every 5 seconds we check if there are appropriate files in the specified directory. (using adir command) If there is then we copy the files to the table. But before that we have to wait another 5 seconds because its possible that the file is there but it is not complete. I actually asked my boss the exact same question.
>

Chris,

Instead of a second timer, try something like this:
*: Found a file, wait 5 seconds to be sure it's complete
LOCAL tTime
tTime = DateTime()
DO WHILE DateTime() < tTime + 5
ENDDO
Or, to save processor time for other programs, you can use the Windows API Sleep().
DECLARE Sleep IN Win32API INTEGER nMilliseconds
Then in your timer event
=Sleep(5000)
See WindowsAPI#12645 in the UT for more information.
David.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform