Use system sleep functions as threadDelay sleep to long without -threaded

This commit is contained in:
Matthias Schiffer 2010-04-07 15:07:27 +02:00
parent c0d2d54ea1
commit d6b28723a2
5 changed files with 17 additions and 4 deletions

View file

@ -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 <GL/glx.h>
#include <unistd.h>
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 ()