From bc79a08491bb14a463b6b7554a64ac1347c02a6a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 12 Sep 2007 08:58:03 +0200 Subject: only use 1 decimal place for showing floating numbers darcs-hash:20070912065803-740ef-209c2cf47f371f163f1fa0db60d6838f7190f60c.gz --- Plugins/Monitors/Common.hs | 2 +- Plugins/Monitors/Mem.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs index bbc9c39..5177fb8 100644 --- a/Plugins/Monitors/Common.hs +++ b/Plugins/Monitors/Common.hs @@ -249,7 +249,7 @@ showDigits d n = floatToPercent :: Float -> String floatToPercent n = - showDigits 2 (n * 100) ++ "%" + showDigits 1 (n * 100) ++ "%" stringParser :: Pos -> B.ByteString -> String stringParser (x,y) = diff --git a/Plugins/Monitors/Mem.hs b/Plugins/Monitors/Mem.hs index 2236256..65a8e96 100644 --- a/Plugins/Monitors/Mem.hs +++ b/Plugins/Monitors/Mem.hs @@ -37,7 +37,7 @@ parseMEM = formatMem :: [Float] -> Monitor [String] formatMem x = - do let f n = showDigits 2 n + do let f n = showDigits 1 n mapM (showWithColors f) x runMem :: [String] -> Monitor String -- cgit v1.2.3