-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
instance Random DiffTime where
random :: (RandomGen g) => g -> (DiffTime, g)
random g =
let (i, g') = random g
in (picosecondsToDiffTime $ fromIntegral (i :: Integer), g')
randomR :: RandomGen g => (DiffTime, DiffTime) -> g -> (DiffTime, g)
randomR (a, b) g =
let (i, g') = randomR (diffTimeToPicoseconds a, diffTimeToPicoseconds b) g
in (picosecondsToDiffTime i, g')
Note that the instance can't go into time
because of random -> splitmix -> time
dependency chain.
Metadata
Metadata
Assignees
Labels
No labels