- struct timeval stv;
- int i;
-
- if (gettimeofday(&stv, 0)) return;
-
- if (abs(stv.tv_sec - time_clock.tv_sec) < time_precision) return;
- time_clock.tv_sec = stv.tv_sec;
- time_clock.tv_sec -= time_clock.tv_sec % time_precision;
-
- // urgent task
- GSList* urgent_task = urgent_list;
- while (urgent_task) {
- Task_urgent* t = urgent_task->data;
- if ( t->tick < max_tick_urgent) {
- t->tsk->area.is_active = !t->tsk->area.is_active;
- t->tsk->area.redraw = 1;
- t->tick++;
- }
- urgent_task = urgent_task->next;
- }
-
- // update battery
-#ifdef ENABLE_BATTERY
- if (battery_enabled) {
- update_battery();
- for (i=0 ; i < nb_panel ; i++)
- panel1[i].battery.area.resize = 1;
- }
-#endif
-
- // update clock
- if (time1_format) {
- for (i=0 ; i < nb_panel ; i++)
- panel1[i].clock.area.resize = 1;
- }
- panel_refresh = 1;