packages feed

darcs-beta-2.7.98.1: src/win32/System/Posix.hs

{-# LANGUAGE ForeignFunctionInterface #-}

module System.Posix ( sleep ) where

import Foreign.C.Types ( CInt, CUInt, CULong )

foreign import stdcall "winbase.h SleepEx" c_SleepEx :: CULong -> CUInt -> IO CInt

sleep :: Integer -> IO CInt
sleep n = c_SleepEx (1000 * fromIntegral n) 1