Permalink
Browse files

bind and wrap zmq_sleep()

  • Loading branch information...
1 parent 28ddd4e commit 956c4230ce065aeb309443c8bbe7ab49d5ccd687 @galdor galdor committed Oct 6, 2011
Showing with 9 additions and 1 deletion.
  1. +3 −0 src/ffi.lisp
  2. +2 −1 src/packages.lisp
  3. +4 −0 src/zmq.lisp
View
@@ -126,3 +126,6 @@
(defcfun (%stopwatch-stop "zmq_stopwatch_stop") :ulong
(watch :pointer))
+
+(defcfun (%sleep "zmq_sleep") :void
+ (seconds :int))
View
@@ -23,11 +23,12 @@
:poll
:stopwatch-start :stopwatch-stop :with-stopwatch
+ :sleep
:zmq-error
:einval-error :enodev-error :eintr-error :efault-error :enomem-error
:eagain-error :emfile-error :enotsup-error :eprotonosupport-error
:enobufs-error :enetdown-error :eaddrinuse-error :eaddrnotavail-error
:econnrefused-error :einprogress-error :enotsock-error
:efsm-error :enocompatproto-error :eterm-error :emthread-error)
- (:shadow :close))
+ (:shadow :close :sleep))
View
@@ -406,3 +406,7 @@ ITEMS."
`(let ((,handle (stopwatch-start)))
,@body
(stopwatch-stop ,handle))))
+
+(defun sleep (seconds)
+ "Sleep for SECONDS seconds."
+ (%sleep seconds))

0 comments on commit 956c423

Please sign in to comment.