Once my battery is almost charged up, a quite huge number appears:

I'm not sure this is correct. I guess it seems to be the integer part of (2^(64)-1)/60. So probably something overflows/get's stuck in u64 max.
This is on i3status-rs 0.14.0
@Thra11 seems related to #665?
Can you try to determine which method it's using to determine the time to full? Which of the following exist in /sys/class/power_supply/<your battery identifier>?
time_to_empty
time_to_full
energy_full
charge_full
energy_now
charge_now
power_now
current_now
It is possible that the charging current backs off as it approaches 100%. Can you confirm that, if left for a while, it does eventually charge up to 100%?
Can you confirm that, if left for a while, it does eventually charge up to 100%?
Yes, indeed.
So based on what properties are present, it should be taking
full = energy_full
fill = energy_now
usage = power_now
then doing ((full - fill) / usage) * 60.0 (卤some unwrapping and casting). Are you able to get it into the bug state and read out the values of energy_full, energy_now and power_now?
A quick fix for this (which has shown up in the past) would be to check of whether the differences are smaller than some tiny value before attempting any division.
Funnily I wasn't able to reproduce this in the meantime. I don't know why. I will report back when I get the info, @Thra11 . Shall I close the issue, or let it open?
Please leave it open
I think that interface is already a mess on the kernel side, we basically have to deal with a lot of quirks already coming from the battery vendors.. I think we should just add some basic sanity checks on the times, and just don't display anything above like a week.
Unless I have misunderstood then #912 should resolve this for now.