Commit 5216adf4 authored by Simon Marlow's avatar Simon Marlow
Browse files

FIX #1272: include the picoseconds field of ClockTime in the seed

parent 3f8fe43b
......@@ -304,8 +304,8 @@ instance Random Float where
mkStdRNG :: Integer -> IO StdGen
mkStdRNG o = do
ct <- getCPUTime
(TOD sec _) <- getClockTime
return (createStdGen (sec * 12345 + ct + o))
(TOD sec psec) <- getClockTime
return (createStdGen (sec * 12345 + psec + ct + o))
randomIvalInteger :: (RandomGen g, Num a) => (Integer, Integer) -> g -> (a, g)
randomIvalInteger (l,h) rng
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment