diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-12-08 20:09:33 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-12-08 20:09:33 +0100 |
commit | 5a8064c2a5dd10fb1a6c6c2bf9fa560402f886ac (patch) | |
tree | 0f6d4e7b7c2b4ffd9bb94608b23d2c95e9ed9c5f /Plugins/Monitors/Common.hs | |
parent | 386c07f501d2522bd2e3aba8a4f81e52fcafe008 (diff) | |
download | xmobar-5a8064c2a5dd10fb1a6c6c2bf9fa560402f886ac.tar.gz xmobar-5a8064c2a5dd10fb1a6c6c2bf9fa560402f886ac.tar.bz2 |
CpuFreq: limit GHz values to one decimal digit
Thanks to Petr Rockai
Diffstat (limited to 'Plugins/Monitors/Common.hs')
-rw-r--r-- | Plugins/Monitors/Common.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs index 9f1db3c..9a76be5 100644 --- a/Plugins/Monitors/Common.hs +++ b/Plugins/Monitors/Common.hs @@ -317,9 +317,8 @@ takeDigits d n = fromIntegral (round (n * fact) :: Int) / fact where fact = 10 ^ d -showDigits :: Int -> Float -> String -showDigits d n = - showFFloat (Just d) n "" +showDigits :: (RealFloat a) => Int -> a -> String +showDigits d n = showFFloat (Just d) n "" showWithUnits :: Int -> Int -> Float -> String showWithUnits d n x |