Add glfwWaitEventsTimeout

This function will put the calling thread to sleep until an event
arrives or until the specified timeout has elapsed.
This commit is contained in:
Camilla Berglund
2016-02-02 21:11:16 +01:00
parent 337c77a39b
commit 5620895e88
11 changed files with 150 additions and 0 deletions
+5
View File
@@ -516,6 +516,11 @@ void _glfwPlatformWaitEvents(void)
handleEvents(-1);
}
void _glfwPlatformWaitEventsTimeout(double timeout)
{
handleEvents((int) (timeout * 1e3));
}
void _glfwPlatformPostEmptyEvent(void)
{
wl_display_sync(_glfw.wl.display);