Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transfer Rate
Message
From
27/02/2003 17:28:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00759110
Message ID:
00759136
Views:
20
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform