apm_power: calculate to_full/to_empty time using energy