Skip to content

Commit

Permalink
more Timer support, thanks to "Joshua Ball" <joshbball@gmail.com>.
Browse files Browse the repository at this point in the history
darcs-hash:20090105202141-3f8d4-8c9a94f885598be2c78d414695377b6ae7111757.gz
  • Loading branch information
aycan.irican committed Jan 5, 2009
1 parent 2eb655d commit 2dc8a48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Network/Libev.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ module Network.Libev
, evLoopDestroy
-- ev_io
, mkEvIo
, mkEvTimer
, mkIoCallback
, mkTimerCallback
, IoCallback (..)
, evIoInit
, evIoStart
Expand Down Expand Up @@ -93,7 +95,7 @@ foreign import ccall unsafe "wev_io_init" evIoInit :: EvIoPtr -> FunPtr IoCallba
foreign import ccall unsafe "wev_io_start" evIoStart :: EvLoopPtr -> EvIoPtr -> IO ()
foreign import ccall unsafe "wev_io_stop" evIoStop :: EvLoopPtr -> EvIoPtr -> IO ()

foreign import ccall unsafe "wev_timer_init" evTimerInit :: EvTimerPtr -> FunPtr TimerCallback -> CInt -> CInt -> IO ()
foreign import ccall unsafe "wev_timer_init" evTimerInit :: EvTimerPtr -> FunPtr TimerCallback -> CFloat -> CFloat -> IO ()
foreign import ccall unsafe "wev_timer_start" evTimerStart :: EvLoopPtr -> EvTimerPtr -> IO ()
foreign import ccall unsafe "wev_timer_stop" evTimerStop :: EvLoopPtr -> EvTimerPtr -> IO ()

Expand All @@ -104,6 +106,7 @@ foreign import ccall unsafe "c_accept" c_accept :: CInt -> IO (CInt)

-- callback wrappers
foreign import ccall "wrapper" mkIoCallback :: IoCallback -> IO (FunPtr IoCallback)
foreign import ccall "wrapper" mkTimerCallback :: IoCallback -> IO (FunPtr TimerCallback)

-- mem allocators
-- foreign import ccall unsafe "wmkevio" mkEvIo :: IO (EvIoPtr)
Expand Down

0 comments on commit 2dc8a48

Please sign in to comment.