Lines Matching defs:battery_info
159 batteryInfo *battery_info;
166 if ((battery_info = g_hash_table_lookup(saved_battery_info, id))) {
168 if ((cur_time == battery_info->last_time) || (chargeLevel == battery_info->last_level)) {
172 chargeRate = battery_info->last_chargeRate;
174 chargeRate = ((chargeLevel - battery_info->last_level) * 60 * 60) / (cur_time - battery_info->last_time);
182 battery_info->last_level = chargeLevel;
183 battery_info->last_time = cur_time;
184 battery_info->last_chargeRate = chargeRate;
187 battery_info = g_new0(batteryInfo, 1);
188 g_hash_table_insert(saved_battery_info, (char*) id, battery_info);
190 battery_info->last_level = chargeLevel;
191 battery_info->last_time = cur_time;
192 battery_info->last_chargeRate = 0;