From d6b28723a26151d8ac6cb195d4e2135b05fdac5a Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 7 Apr 2010 15:07:27 +0200 Subject: Use system sleep functions as threadDelay sleep to long without -threaded --- src/Bindings/GLX.hsc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Bindings') diff --git a/src/Bindings/GLX.hsc b/src/Bindings/GLX.hsc index d5fed4d..f773aad 100644 --- a/src/Bindings/GLX.hsc +++ b/src/Bindings/GLX.hsc @@ -20,6 +20,7 @@ module Bindings.GLX ( createColormap , makeCurrent , destroyContext , swapBuffers + , glxUsleep , Context(..) , Drawable ) where @@ -41,6 +42,7 @@ import Graphics.X11.Xlib.Types (Dimension, Display, Pixel, Position) #include +#include type Drawable = XID @@ -263,3 +265,6 @@ foreign import ccall unsafe "GL/glx.h glXDestroyContext" foreign import ccall unsafe "GL/glx.h glXSwapBuffers" swapBuffers :: Display -> Drawable -> IO () + +foreign import ccall unsafe "unistd.h usleep" + glxUsleep :: CULong -> IO () -- cgit v1.2.3