Searched refs:battery_info (Results 1 – 1 of 1) sorted by relevance
159 batteryInfo *battery_info; in util_compute_time_remaining() local166 if ((battery_info = g_hash_table_lookup(saved_battery_info, id))) { in util_compute_time_remaining()168 if ((cur_time == battery_info->last_time) || (chargeLevel == battery_info->last_level)) { in util_compute_time_remaining()172 chargeRate = battery_info->last_chargeRate; in util_compute_time_remaining()174 …chargeRate = ((chargeLevel - battery_info->last_level) * 60 * 60) / (cur_time - battery_info->last… in util_compute_time_remaining()182 battery_info->last_level = chargeLevel; in util_compute_time_remaining()183 battery_info->last_time = cur_time; in util_compute_time_remaining()184 battery_info->last_chargeRate = chargeRate; in util_compute_time_remaining()187 battery_info = g_new0(batteryInfo, 1); in util_compute_time_remaining()188 g_hash_table_insert(saved_battery_info, (char*) id, battery_info); in util_compute_time_remaining()[all …]