
30 Apr
2007
30 Apr
'07
8:11 a.m.
Martin Percossi wrote:
Hello haskell-cafe,
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).
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-P... getPOSIXTime will do what you want. Cheers, Simon