diff options
-rw-r--r-- | glcapture.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/glcapture.c b/glcapture.c index d7b4a78..99db7eb 100644 --- a/glcapture.c +++ b/glcapture.c @@ -468,6 +468,8 @@ draw_indicator(const GLint view[4]) static void swap_buffers(void) { + const uint64_t start = get_time_ns(); + void* (*procs[])(const char*) = { (void*)_eglGetProcAddress, (void*)_glXGetProcAddressARB, @@ -487,6 +489,10 @@ swap_buffers(void) WARNX("glError occured"); reset_capture(&gl); } + + const double ms = (get_time_ns() - start) / 1e6; + if (ms >= 1.0) + WARNX("WARNING: capture took %.2f ms (>=1ms)", ms); } static const char* |