diff options
Diffstat (limited to 'testsuite/tests/concurrent/should_run/conc059.hs')
-rw-r--r-- | testsuite/tests/concurrent/should_run/conc059.hs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/testsuite/tests/concurrent/should_run/conc059.hs b/testsuite/tests/concurrent/should_run/conc059.hs index 86e202c9a2..823d8b7a03 100644 --- a/testsuite/tests/concurrent/should_run/conc059.hs +++ b/testsuite/tests/concurrent/should_run/conc059.hs @@ -13,22 +13,9 @@ import Foreign.C f :: Int -> IO () f x = do print x - replicateM_ 10 $ forkIO $ do usleep (fromIntegral x); putStrLn "hello" + replicateM_ 10 $ forkIO $ do millisleep (fromIntegral x); putStrLn "hello" return () foreign export ccall "f" f :: Int -> IO () -#if defined(mingw32_HOST_OS) -# if defined(i386_HOST_ARCH) -# define WINDOWS_CCONV stdcall -# elif defined(x86_64_HOST_ARCH) -# define WINDOWS_CCONV ccall -# else -# error Unknown mingw32 arch -# endif - -foreign import WINDOWS_CCONV safe "Sleep" _sleep :: Int -> IO () -usleep n = _sleep (n `quot` 1000) -#else -foreign import ccall safe "usleep" usleep :: Int -> IO () -#endif +foreign import ccall safe "millisleep" millisleep :: CInt -> IO () |