Re: Connection Speed (Internet help needed)
- Posted by "Thomas Parslow (PatRat)" <tom at almostobsolete.net> Feb 19, 2002
- 409 views
> hi, > i'm creating a program for downloading files from ftp servers and i have > be confronted by people asking me to add an area telling them how much > time left/how much elapsed just like IE. > In order for me to do this, i will have to be knowing the connection > speed? I'm coding my program using the winsock wrapper.. > is there some one out there who can help me out? Either with API code to > do this...or anything that can help > Jordah > jorfergie03 at yahoo.com Just divide the seconds you have been downloading by the amount of bytes you have transferred so far, this will give you bytes per second. You can then divide the number of bytes left by bytes per second and you have a estimation of the number of seconds left. That's how IE and most other download programs do it. Thomas Parslow (PatRat) ICQ #:26359483 Rat Software http://www.rat-software.com/ Please leave quoted text in place when replying