Hi,
I discovered a bug in the Time module. If I run the
following code snippet:
main :: IO ()
main =
do t0 - getClockTime
system sleep 120
t1 - getClockTime
print (t1 `diffClockTimes` t0)
The TimeDiff value has a tdSec field greater than 59, and a
tdMin field of 0
On Wed, Sep 26, 2001 at 16:21:09 +0200, Koen Claessen wrote:
I discovered a bug in the Time module. If I run the
following code snippet:
Just one? ;)
[...]
The TimeDiff value has a tdSec field greater than 59, and a
tdMin field of 0. I guess this is a bug.
I am running ghc-5.00.2
I discovered a bug in the Time module. If I run the
following code snippet:
main :: IO ()
main =
do t0 - getClockTime
system sleep 120
t1 - getClockTime
print (t1 `diffClockTimes` t0)
The TimeDiff value has a tdSec field greater than 59, and a
tdMin
| I'm not sure it's a bug - Haskell 98 doesn't require
| that the TimeDiff value returned from diffClockTimes
| is normalised in any way, and it can't be done in
| general of course because months and years have
| different numbers of days, even minutes have different
| numbers of seconds