From a0f8de19ed0c87abe16a7008a444f8563b351dd1 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 30 Jan 2006 11:53:01 +0000 Subject: [PATCH] fix bug #664 in printSample() printSample() was attempting to round the fractional part of the time, but not propagated to the non-fractional part. It's probably better not to attempt to round the time at all. --- ghc/rts/ProfHeap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc/rts/ProfHeap.c b/ghc/rts/ProfHeap.c index 8c088b7..c7ed1d0 100644 --- a/ghc/rts/ProfHeap.c +++ b/ghc/rts/ProfHeap.c @@ -389,7 +389,7 @@ printSample(rtsBool beginSample, StgDouble sampleValue) fractionalPart = modf(sampleValue, &integralPart); fprintf(hp_file, "%s %d.%02d\n", (beginSample ? "BEGIN_SAMPLE" : "END_SAMPLE"), - (int)integralPart, (int)(fractionalPart * 100 + 0.5)); + (int)integralPart, (int)(fractionalPart * 100)); } /* -------------------------------------------------------------------------- -- 1.7.10.4