I had to make a decision. If curl estimates time left to transfer a file is 4398046511103 seconds. How do we display that in - 7 bytes?

I decided that if the time exceeds 99,999 years we show it as ">99999y" even though a 63bit epoch *can* hold up to 292 billion years.

7 bytes because I need the entire curl progress meter to fit within 79 bytes.

What's a better thing to do on a Saturday? 😁

github.com/curl/curl/pull/2017…

in reply to daniel:// stenberg://

When you write 7 or 79 "bytes" do you mean [ASCII] characters or is there some technical limit of storage??

Not meant to nitpick, actually confused. Maybe because I'm not a C programmer but Perl very well knows about byte length and string length🤔

Edit: missed the PR link before posting. The PR makes it all clear. My bad!

This entry was edited (4 days ago)