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-POSIX.html

getPOSIXTime will do what you want.

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

Reply via email to