Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INKEY() Speed
Message
De
02/01/2011 17:20:13
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
02/01/2011 15:30:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01494340
Message ID:
01494347
Vues:
93
>Hi All,
>
>Whys is INKEY("H") orders of magnitude slower than just plain INKEY() ?
>
>
>CLEAR
>
>* Sub-second ...
>
>TSECONDS = SECONDS()
>FOR I = 1 TO 100
>  TA=INKEY()
>NEXT
>? SECONDS() - TSECONDS
>
>* Over 6 seconds ! ...
>
>TSECONDS = SECONDS()
>FOR I = 1 TO 100
>  TA=INKEY("H")
>NEXT
>? SECONDS() - TSECONDS
>
Off the top of my head, plain inkey() only looks whether there's a keystroke left in the keyboard buffer. With H, it has to call some system routine which checks who knows what and notifies who knows how many other services that the cursor is now hidden.

But that's just a guess. I actually don't know.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform