Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transfer Rate
Message
De
27/02/2003 17:28:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00759110
Message ID:
00759136
Vues:
25
>Hi,
>Does anyone have a good idea as to how to calculate the transfer rate say, for instance, in megabytes per sec, in copying files?
>Thanks
>Steve

I don't know exactly what you want to achieve, but I would say, something like this:
* Get file sizes with adir(...)
* To variable lnTotalSize
ltStartTime = datetime()
copy file ...
ltEndTime = datetime()
lnTimeElapsed = ltEndTime - ltStartTime
? "Time elapsed:", lnTimeElapsed
? "Transfer rate:", lnTotalSize / lnTimeElapsed, "Bytes per second"
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform