News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

ETA

Started by ecube, July 30, 2009, 03:47:24 AM

Previous topic - Next topic

ecube

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?

dedndave

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)

ecube

fantastic :bg thankyou sir

dedndave

n.p.
$50   :bg

hutch--

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.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dedndave

if you want to see it wander, observe the estimated time to completion when you install windows - lol
they are all over the map