summaryrefslogtreecommitdiff
path: root/glretrace_main.cpp
diff options
context:
space:
mode:
authorJosé Fonseca <jose.r.fonseca@gmail.com>2012-01-19 15:40:59 +0000
committerJosé Fonseca <jose.r.fonseca@gmail.com>2012-01-19 15:40:59 +0000
commitddbf8c0065ce1b7502e3e127a846add476ab7a4c (patch)
tree194cad0cedf17c11997265a5fceeac7d86e45073 /glretrace_main.cpp
parentc76aab3ab2c6fbd3a0354906a2829640935d64e9 (diff)
Make os::getTime() inline and make time frequency OS-dependent variable.
Linux's clock_gettime() implementation from Ryan C. Gordon.
Diffstat (limited to 'glretrace_main.cpp')
-rw-r--r--glretrace_main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/glretrace_main.cpp b/glretrace_main.cpp
index 978a34ee..c2ca6642 100644
--- a/glretrace_main.cpp
+++ b/glretrace_main.cpp
@@ -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 <<