module Data.Time.Clock.DiffTime
( DiffTime,
secondsToDiffTime,
millisecondsToDiffTime,
picosecondsToDiffTime,
diffTimeToFullMicroseconds,
diffTimeToPicoseconds,
)
where
import Data.Time
import Imports
millisecondsToDiffTime :: Integer -> DiffTime
millisecondsToDiffTime :: Integer -> DiffTime
millisecondsToDiffTime = Integer -> DiffTime
picosecondsToDiffTime (Integer -> DiffTime)
-> (Integer -> Integer) -> Integer -> DiffTime
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Integer
e9 *)
diffTimeToFullMicroseconds :: DiffTime -> Int
diffTimeToFullMicroseconds :: DiffTime -> Int
diffTimeToFullMicroseconds = Integer -> Int
forall a. Num a => Integer -> a
fromInteger (Integer -> Int) -> (DiffTime -> Integer) -> DiffTime -> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` Integer
e6) (Integer -> Integer)
-> (DiffTime -> Integer) -> DiffTime -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DiffTime -> Integer
diffTimeToPicoseconds
e6, e9 :: Integer
e6 :: Integer
e6 = Integer
1_000_000
e9 :: Integer
e9 = Integer
1_000_000_000