diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2012-01-19 15:40:59 +0000 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2012-01-19 15:40:59 +0000 |
commit | ddbf8c0065ce1b7502e3e127a846add476ab7a4c (patch) | |
tree | 194cad0cedf17c11997265a5fceeac7d86e45073 /glretrace_main.cpp | |
parent | c76aab3ab2c6fbd3a0354906a2829640935d64e9 (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.cpp | 3 |
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 << |