I'm trying out GHC-7.0.3-x86_64 for Mac OS X and see what seems to be a bug in 
System.Time.diffClockTimes. The TimeDiff tdPicosec field returns values that 
seem to jump around erratically: 

test = do
  startTime <- System.Time.getClockTime
  endTime <- System.Time.getClockTime
  let dt = diffClockTimes endTime startTime
  putStrLn $ show dt

Prelude Test> test
TimeDiff {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0, tdSec = 0, 
tdPicosec = 0}
Prelude Test> test
TimeDiff {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0, tdSec = 0, 
tdPicosec = 3000000}
Prelude Test> test
TimeDiff {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0, tdSec = 0, 
tdPicosec = -3329012246138323150000000}
Prelude Test> test
TimeDiff {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0, tdSec = 0, 
tdPicosec = 3000000}
Prelude Test> test
TimeDiff {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0, tdSec = 0, 
tdPicosec = -3329012246138322851000000}
Prelude Test> 

I can file a bug, unless I'm overlooking something here.

Warren
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to