Xinqi Bao's Git

uptime: Improve typing and sort headers
[slstatus.git] / components / cpu.c
index 3fadb36..cd5ebe4 100644 (file)
@@ -1,5 +1,4 @@
 /* See LICENSE file for copyright and license details. */
-#include <errno.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -20,7 +19,7 @@
                        return NULL;
                }
 
-               return fmt_human_10(freq * 1000);
+               return fmt_human(freq * 1000, 1000);
        }
 
        const char *
@@ -67,7 +66,7 @@
                        return NULL;
                }
 
-               return fmt_human_10((size_t)freq * 1000 * 1000);
+               return fmt_human((size_t)freq * 1000 * 1000, 1000);
        }
 
        const char *