ui: don't waste CPU!!!
This commit is contained in:
parent
1994bceaab
commit
57ac9fee94
|
@ -106,6 +106,19 @@ system_info_all_free(Sys_Info *info)
|
|||
free(info);
|
||||
}
|
||||
|
||||
Sys_Info *
|
||||
system_info_basic_get(void)
|
||||
{
|
||||
Sys_Info *info = calloc(1, sizeof(Sys_Info));
|
||||
if (!info) return NULL;
|
||||
|
||||
info->cores = system_cpu_usage_get(&info->cpu_count);
|
||||
|
||||
system_memory_usage_get(&info->memory);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
Sys_Info *
|
||||
system_info_all_get(void)
|
||||
{
|
||||
|
|
|
@ -83,6 +83,9 @@ struct Sys_Info
|
|||
Sys_Info *
|
||||
system_info_all_get(void);
|
||||
|
||||
Sys_Info *
|
||||
system_info_basic_get(void);
|
||||
|
||||
void
|
||||
system_info_all_free(Sys_Info *);
|
||||
|
||||
|
|
|
@ -1661,7 +1661,7 @@ _system_info_all_poll(void *data, Ecore_Thread *thread)
|
|||
|
||||
while (1)
|
||||
{
|
||||
Sys_Info *info = system_info_all_get();
|
||||
Sys_Info *info = system_info_basic_get();
|
||||
if (!info)
|
||||
{
|
||||
ecore_main_loop_quit();
|
||||
|
|
|
@ -394,11 +394,8 @@ _tree_text_get(void *data, Evas_Object *obj, const char *part)
|
|||
static Evas_Object *
|
||||
_tree_icon_get(void *data, Evas_Object *obj, const char *part)
|
||||
{
|
||||
Proc_Info *proc;
|
||||
Evas_Object *ic = elm_icon_add(obj);
|
||||
|
||||
proc = data;
|
||||
|
||||
if (!strcmp(part, "elm.swallow.icon"))
|
||||
{
|
||||
elm_icon_standard_set(ic, evisum_icon_path_get("application"));
|
||||
|
|
Loading…
Reference in New Issue