Results 1 to 4 of 4

Thread: Estimated Time Left

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    NJ
    Posts
    19

    Question

    I just put a progress bar in my program and was wondering how I could calculate the time that remains like when you download something.

  2. #2
    Guest
    if you know the size of the file you are downloading, then just compare to the amount of file already being downloaded to the size of the original file.

    divide the file size by 100

    Code:
    Increment = FileSize / 100
    and raise the progress bar's value by 1 everytime Increment amount of the file has been downloaded.

  3. #3
    Guest
    Here is a program from http://www.planet-source-code.com which lets you Calculate Internet Download Time.

    If you want to find out the estimated time left for a certain action you do on your form, here is an example from PatorJK's site to tell the estimated time left.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    TimeLeft=(1-AlreadyDownloaded/FileSize)*Elapsedtime-ElapsedTime
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width