Jump to content

Recommended Posts

Posted

Pois é, ca tou eu de novo com o meu velho problema....horas e KB. :down:

Pode ser que alguem me consiga ajudar a fazer os calculos.

A minha pergunta e:

Fazendo um upload a X KB/s e ter de chegar a X Megas quanto tempo demoro? ?

Eu em minutos consigo fazer, mas em horas...chapeu...ja nao consigo...mentalmente consigo mas não consigo passar para o papel.

P.S. Se me conseguirem ajudar e colocarem aqui a maneira para fazer isto, pode ser que depois consiga fazer o que eu quero fazer em Pascal. 🙂

Posted

Dados:

1Mb=1024kb

1h=3600s

Velocidade: X kb/s

Tamanho: Y Mb

Resultado:

Tempo= ( Y / X ) / ( 1024 * 3600 )

Se quiseres o tempo repartido: t_h : t_min : t_seg

t_h = parte inteira [ ( Y / X ) / ( 1024 * 3600 ) ]

t_min = parte inteira [ ( Y / X ) / ( 1024 * 60 ) - t_h*60 ]

t_seg = parte inteira [ ( Y / X ) / ( 1024  ) - ( t_h*60 + t_min)*60 ]

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.