Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Timer within a timer?
Message
De
07/11/2001 08:51:46
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgie, États-Unis
 
 
À
06/11/2001 18:46:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00578290
Message ID:
00578448
Vues:
16
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform