{-# LINE 1 "libraries/base/GHC/Clock.hsc" #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
module GHC.Clock
( getMonotonicTime
, getMonotonicTimeNSec
) where
import GHC.Base
import GHC.Real
import Data.Word
{-# LINE 16 "libraries/base/GHC/Clock.hsc" #-}
getMonotonicTime :: IO Double
getMonotonicTime :: IO Double
getMonotonicTime = do
{-# LINE 26 "libraries/base/GHC/Clock.hsc" #-}
Word64
w <- IO Word64
getMonotonicTimeNSec
Double -> IO Double
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word64 -> Double
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word64
w Double -> Double -> Double
forall a. Fractional a => a -> a -> a
/ Double
1000000000)
{-# LINE 29 "libraries/base/GHC/Clock.hsc" #-}
{-# LINE 43 "libraries/base/GHC/Clock.hsc" #-}
foreign import ccall unsafe "getMonotonicNSec"
getMonotonicTimeNSec :: IO Word64
{-# LINE 46 "libraries/base/GHC/Clock.hsc" #-}