[hackers] [slstatus] cpu_freq: Simplify with E-notation || Aaron Marcher

From: <git_AT_suckless.org>
Date: Sat, 7 Jul 2018 10:56:51 +0200 (CEST)

commit c2492c3f99d9d434a6f935dea8e97fa27cdd2adc
Author: Aaron Marcher <me_AT_drkhsh.at>
AuthorDate: Sat Jul 7 10:56:10 2018 +0200
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Sat Jul 7 10:56:10 2018 +0200

    cpu_freq: Simplify with E-notation
    
    Thanks to the FRIGN

diff --git a/components/cpu.c b/components/cpu.c
index 2c5e4dc..14c8658 100644
--- a/components/cpu.c
+++ b/components/cpu.c
_AT_@ -68,7 +68,7 @@
                         return NULL;
                 }
 
- return fmt_human(freq * 1000 * 1000, 1000);
+ return fmt_human(freq * 1E6, 1000);
         }
 
         const char *
Received on Sat Jul 07 2018 - 10:56:51 CEST

This archive was generated by hypermail 2.3.0 : Sat Jul 07 2018 - 11:00:27 CEST