blob: 4556159d595b051322a589f4a1136e4381556ee9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
module System.CPUTime.Utils
( -- * Integer conversions
-- | These types have no 'Integral' instances in the Haskell report
-- so we must do this ourselves.
cClockToInteger
, cTimeToInteger
, csuSecondsToInteger
) where
import Foreign.C.Types
cClockToInteger :: CClock -> Integer
cClockToInteger (CClock n) = fromIntegral n
cTimeToInteger :: CTime -> Integer
cTimeToInteger (CTime n) = fromIntegral n
csuSecondsToInteger :: CSUSeconds -> Integer
csuSecondsToInteger (CSUSeconds n) = fromIntegral n
|