In System.Time,
data ClockTime = TOD Integer Integer
, where the first integer represents the number of seconds since epoch,
and the other represents the number of picoseconds. Is there a way of
retrieving the first part? (In Haskell 98, the ClockTime type is abstract).
TIA
Martin
My music: http://www.youtube.com/profile?user=thetonegrove
_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Better to use the new time package, in particular Data.Time.Clock.POSIX:
http://www.haskell.org/ghc/docs/latest/html/libraries/time/Data-Time-Clock-POSIX.html
getPOSIXTime will do what you want.
Cheers,
Simon
I usually pattern match the constructor:
do { TOD epoch _ <- getClockTime
; putStrLn $ "epoch is " ++ show epoch }
--
Rich
AIM : rnezzy
ICQ : 174908475
Jabber: ri...@neswold.homeunix.net