[PHP] Help needed with calculation

2009-11-15 Thread Chris Payne
Hi everyone, I'm not sure of the correct formula for this, if I have a file - just for example, that is 10245458756 bytes long and the download speed is 60KB a second, what formula would I use to calculate how many seconds/minutes/hours it would take to download the file? Maths really isn't my

Re: [PHP] Help needed with calculation

2009-11-15 Thread Adam Shannon
If the download speed is constant (linear) then you can just use. (10245458756 / 6t)/1000 = kb/second or (10245458756 / 6t)/6 = kb/minute The general form would be. (size_of_file / download_speed * time) / convert_to_units Where t (or time) is the amount of seconds that the download