cpu: cpufreq fallback (oops).

This commit is contained in:
Alastair Poole 2020-09-06 21:40:39 +01:00
parent 4f5db6604f
commit 43a4122893
2 changed files with 3 additions and 3 deletions

View File

@ -321,7 +321,7 @@ system_cpu_frequency_get(void)
char *s = strchr(buf, ':') + 1;
tmp = strtol(s, NULL, 10);
if (!((tmp == LONG_MIN || tmp == LONG_MAX) && errno == ERANGE))
tmp *= 1000;
freq = tmp * 1000;
break;
}
}

View File

@ -1670,9 +1670,9 @@ _system_info_all_poll_feedback_cb(void *data, Ecore_Thread *thread, void *msg)
if (Hz != -1)
{
if (Hz > 1000000)
elm_object_tooltip_text_set(ui->progress_cpu, eina_slstr_printf("%1.1fGHz", (double) Hz / 1000000.0));
elm_object_tooltip_text_set(ui->progress_cpu, eina_slstr_printf("%1.1f GHz", (double) Hz / 1000000.0));
else
elm_object_tooltip_text_set(ui->progress_cpu, eina_slstr_printf("%dMHz", Hz / 1000));
elm_object_tooltip_text_set(ui->progress_cpu, eina_slstr_printf("%d MHz", Hz / 1000));
}
ui->cpu_usage = cpu_usage;