Hello to all.

How can you translate a number, for example, 1244824 in normal time, the format is чч:мм:сс . Can somehow take 4 high bits, and do something with them?

  • 3
    Probably, according to the same formula, according to which meters are converted to kilograms. - karmadro4

1 answer 1

Weird question. "Just a number" has nothing to do with time. 1244824 Are these born racoons from the birth of Christ? Or the number of revolutions of Mars around the sun?

If it is seconds from January 1, 1970 UTC (Received from time ()). You can use strftime. The example given by reference can be converted to receive data in the format hh: mm: ss.

 time_t rawtime; struct tm * timeinfo; char buffer [80]; time ( &rawtime ); timeinfo = localtime ( &rawtime ); strftime (buffer,80,"%H:%M:%S.",timeinfo); 
  • 1244824 was the time written in bytes. - marioxxx
  • one
    Again, I repeat that just a number is not related to time. Whether it is recorded in bytes, megabytes, on paper or carved on stone. If you tell where you got this number from, you may be able to help. - IronVbif
  • x = u ∙ t ∴ t = x / u where x is the number of bytes, t is the time in seconds u is the Internet speed from the IETF directory [bytes / sec] - karmadro4
  • It was received from the server at a specific ip address. Yes, I already did ... It turns out it was the word HTTP =))) - marioxxx