diff options
-rw-r--r-- | glcapture.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glcapture.c b/glcapture.c index c6fd494..a38a202 100644 --- a/glcapture.c +++ b/glcapture.c @@ -138,9 +138,9 @@ struct buffer { }; #define PROFILE(x, warn_ms, name) do { \ - const uint64_t start = get_time_ns(); \ + const uint64_t start = get_time_ns_clock(CLOCK_PROCESS_CPUTIME_ID); \ x; \ - const double ms = (get_time_ns() - start) / 1e6; \ + const double ms = (get_time_ns_clock(CLOCK_PROCESS_CPUTIME_ID) - start) / 1e6; \ if (ms >= warn_ms) WARNX("WARNING: %s took %.2f ms (>=%.0fms)", name, ms, warn_ms); \ } while (0) |