;; glfw poll events must be called in primary thread
(bind-func event_poll
(lambda (time:i64 delta_t:double)
;; (println "HIT" time)
(glfwPollEvents)
(let ((next_time (+ time (convert (* 44100. delta_t)))))
(callback next_time event_poll next_time delta_t))))