[Haskell-cafe] Re: Getting the number of seconds since epoch from
simonmarhaskell at gmail.com
Mon Apr 30 08:11:50 EDT 2007
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:
getPOSIXTime will do what you want.
More information about the Haskell-Cafe