Convert NominalDiffTime to Real

Viewed 2403

In the documentation for Data.Time.Clock I see this:

Conversion functions will treat it as seconds. It has a precision of 10^-12 s

What function will turn that NominalDiffTime into a Double? No luck hoogling it

3 Answers

Since time-1.9.1 you can use nominalDiffTimeToSeconds from Data.Time.Clock module:

nominalDiffTimeToSeconds :: NominalDiffTime -> Pico

Get the seconds in a NominalDiffTime.
Related