Example #1
0
/*
 * Work through events returned from iphone
 */
void process_events() {
  if (g_max_entries == 0) {
    clear_timers();	
  } else {
    clear_timers();	
	int alerts = 0;
	g_alerts_issued = 0;  
    for (uint8_t i = 0; i < g_max_entries; i++) 
	  alerts = alerts + determine_if_alarm_needed(i);
	if (alerts > 0) 
		set_status(STATUS_ALERT_SET);
   }
}
Example #2
0
/*
 * Work through events returned from iphone
 */
void process_events() {
  if (calendar_request_outstanding || max_entries == 0) {
    clear_timers();	
  } else {
    clear_timers();	
	int alerts = 0;
	alerts_issued = 0;  
    for (int entry_no = 0; entry_no < max_entries; entry_no++) 
	  alerts = alerts + determine_if_alarm_needed(entry_no);
	if (alerts > 0) 
		set_event_status(STATUS_ALERT_SET);
   }
}
Example #3
0
void end_process_data(void)
{
	report_utilization("cpu-consumption", total_cpu_time());
	report_utilization("cpu-wakeups", total_wakeups());
	report_utilization("gpu-operations", total_gpu_ops());
	report_utilization("disk-operations", total_disk_hits());
	report_utilization("disk-operations-hard", total_hard_disk_hits());
	report_utilization("xwakes", total_xwakes());

	all_power.erase(all_power.begin(), all_power.end());
	clear_processes();
	clear_proc_devices();
	clear_interrupts();
	clear_timers();
	clear_work();
	clear_consumers();

	perf_events->clear();

}