Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sleep(1) too slow
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00916333
Message ID:
00916842
Vues:
8
>Thanks Paul but tried them already, SleepEx(1,1) takes a minimum of 15ms while SleepEx(0,1) takes no time at all and therefore causes 100% cpu.
>
Nick,

You have to remember that Win32 is a pre-emptive operating system. This means that Windows decides how much time each thread gets. IOW, Windows is the dog, your application is the tail, and the tail wags only when the dog says so. You simply can't get the degree of granularity you seem to need. The amount of time Sleep(1) or Sleep(0) will vary from computer to computer depending on everything from clock speed to number of threads running.

If you don't mind my making a suggestion, could you tell us in detail what and why you're trying to accomplish this.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform