Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. How to find estimated time remaining ?

How to find estimated time remaining ?

Scheduled Pinned Locked Moved Algorithms
designalgorithmstutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yogish293
    wrote on last edited by
    #1

    Hi, i have created one portable application,initially it will take several time to install on to pendrive(installer doing more on dll copy option), for that i want to show time remaining in my UI. can any one suggest me best algorithm to do this please

    L 1 Reply Last reply
    0
    • Y yogish293

      Hi, i have created one portable application,initially it will take several time to install on to pendrive(installer doing more on dll copy option), for that i want to show time remaining in my UI. can any one suggest me best algorithm to do this please

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      If you know how much data you need to install then you can set a timer to measure your install speed and use that value to estimate how much time the remainder will take. Adjust the value as you go through the install. Something like: Total to install 1Mb After installing 100Kb time taken is 2 seconds, so time left is ((1000 - 100) / 100 * 2) = 18 seconds After installing 200Kb time taken is 3 seconds, so time left is ((1000 - 200 / 200 * 3) = 12 etc.

      The best things in life are not things.

      Y 1 Reply Last reply
      0
      • L Lost User

        If you know how much data you need to install then you can set a timer to measure your install speed and use that value to estimate how much time the remainder will take. Adjust the value as you go through the install. Something like: Total to install 1Mb After installing 100Kb time taken is 2 seconds, so time left is ((1000 - 100) / 100 * 2) = 18 seconds After installing 200Kb time taken is 3 seconds, so time left is ((1000 - 200 / 200 * 3) = 12 etc.

        The best things in life are not things.

        Y Offline
        Y Offline
        yogish293
        wrote on last edited by
        #3

        for this always we should know how much size is already installed/copied right...?

        L 1 Reply Last reply
        0
        • Y yogish293

          for this always we should know how much size is already installed/copied right...?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          yogish293 wrote:

          for this always we should know how much size is already installed/copied right...?

          Yes, you can only ever make a reasonable estimate by knowing: - How much has already been copied - How much time the copying took - How much data remains

          The best things in life are not things.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups