module System.CPUTime.Utils
(
cClockToInteger
, cTimeToInteger
, csuSecondsToInteger
) where
import GHC.Internal.Foreign.C.Types
import GHC.Num.Integer (Integer)
import GHC.Internal.Real (fromIntegral)
cClockToInteger :: CClock -> Integer
cClockToInteger :: CClock -> Integer
cClockToInteger (CClock Int64
n) = Int64 -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int64
n
cTimeToInteger :: CTime -> Integer
cTimeToInteger :: CTime -> Integer
cTimeToInteger (CTime Int64
n) = Int64 -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int64
n
csuSecondsToInteger :: CSUSeconds -> Integer
csuSecondsToInteger :: CSUSeconds -> Integer
csuSecondsToInteger (CSUSeconds Int64
n) = Int64 -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int64
n