]> git.cworth.org Git - apitrace/blobdiff - glretrace_main.cpp
Make os::getTime() inline and make time frequency OS-dependent variable.
[apitrace] / glretrace_main.cpp
index 89021f14f4ee6644cb705dc54c0c003aee57619c..c2ca664239500d76d7d0dc2390533d80139a99f7 100644 (file)
@@ -27,6 +27,7 @@
 #include <string.h>
 
 #include "os_string.hpp"
+#include "os_time.hpp"
 #include "image.hpp"
 #include "retrace.hpp"
 #include "glproc.hpp"
@@ -230,7 +231,7 @@ static void display(void) {
     glFlush();
 
     long long endTime = os::getTime();
-    float timeInterval = (endTime - startTime) * 1.0E-6;
+    float timeInterval = (endTime - startTime) * (1.0 / os::timeFrequency);
 
     if (retrace::verbosity >= -1) { 
         std::cout << 
@@ -259,7 +260,7 @@ static void usage(void) {
         "  -sb          use a single buffer visual\n"
         "  -s PREFIX    take snapshots; `-` for PNM stdout output\n"
         "  -S FREQUENCY snapshot frequency: frame (default), framebuffer, or draw\n"
-        "  -v           verbose output\n"
+        "  -v           increase output verbosity\n"
         "  -D CALLNO    dump state at specific call no\n"
         "  -w           wait on final frame\n";
 }