converting to hours (time) from kilobytes streamed?

  • Thread starter Thread starter pbd22
  • Start date Start date
P

pbd22

Hi.

Could somebody provide me with a formula (or, better, a
code example) for converting kilobytes to hours (or, time) from the
server?

Thanks.
 
pbd22 said:
Could somebody provide me with a formula (or, better, a
code example) for converting kilobytes to hours (or, time) from the
server?

Well, fundamentally it's just:

timeLeft = dataLeft / transferRate;

Now you just need to make sure that you've got dataLeft and
transferRate in the right units, and you're away.
 
You would need to have the transfer speed in bytes/sec, then its the total
number of bytes remaining divided by the bytes/sec divided by 60 (to get
minutes) divided by 60 again to get hours.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top