i'm trying to do a simple "time left" thing for file transfer, instead of basing it on the transfer speed, I want to base it on
* how much time has gone by since file started transferring
* what percentage of the file has been sent
using those two factors how do I go about getting the estimated time of completion?
is this what you mean ?
(time remaining) = (percent remaining) * (time elapsed) / (percent complete)
of course, (percent remaining) = 100 - (percent complete)
so, (time remaining) = (100 - (percent complete)) * (time elapsed) / (percent complete)
fantastic :bg thankyou sir
n.p.
$50 :bg
cube,
You need to get a sample of the data transfer rate at the start of the file transfer then periodically test to see if the data transfer rate is similar. It would be useless on small sample < 1 meg but with large files if you test the first meg or so them calculate the file length and how long it will take to fully transfer the file.
You see it regularly on internet data transfer where you often have big files and low data transfer rates but they still wander a lot on the time estimate.
if you want to see it wander, observe the estimated time to completion when you install windows - lol
they are all over the map