X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=flow.cpp;h=b46e0a10c74cff067b2a5c67675baece2adfe329;hb=c240834b6e92f10da89c1cf6f4520c2b1b641312;hp=5673ef6f977842c57377983f58027041b44fa796;hpb=1ed10162dcc208c0f95da7f203f51be6ccea0900;p=nageru diff --git a/flow.cpp b/flow.cpp index 5673ef6..b46e0a1 100644 --- a/flow.cpp +++ b/flow.cpp @@ -15,6 +15,7 @@ #include #include +#include #include "util.h" @@ -524,6 +525,7 @@ int main(void) GLint available; do { glGetQueryObjectiv(query, GL_QUERY_RESULT_AVAILABLE, &available); + usleep(1000); } while (!available); GLuint64 time_elapsed; glGetQueryObjectui64v(query, GL_QUERY_RESULT, &time_elapsed);