diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2013-01-28 12:26:33 -0500 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2013-01-28 12:26:33 -0500 |
commit | bc58d14ce826c1e54eda0138a549474fa026023d (patch) | |
tree | 0fc18839748bb3581e36de0d31ab8008a899f229 | |
parent | 312e0651a273c3cbc32838b40d51186bc28f00be (diff) | |
download | cogl-bc58d14ce826c1e54eda0138a549474fa026023d.tar.gz |
Don't convert gettimeofday() UST values
Instead of converting gettimeofday() UST values into
clock_gettime(CLOCK_MONOTONIC, ...), just return them raw, and the
caller can convert using cogl_clock_get_time().
-rw-r--r-- | cogl/winsys/cogl-winsys-glx.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c index 895b612f..04999146 100644 --- a/cogl/winsys/cogl-winsys-glx.c +++ b/cogl/winsys/cogl-winsys-glx.c @@ -248,20 +248,6 @@ ust_to_nanoseconds (CoglRenderer *renderer, g_assert_not_reached (); break; case COGL_GLX_UST_IS_GETTIMEOFDAY: - { - struct timeval tv; - struct timespec ts; - int64_t current_system_time; - int64_t current_monotonic_time; - - gettimeofday(&tv, NULL); - clock_gettime (CLOCK_MONOTONIC, &ts); - current_system_time = (tv.tv_sec * G_GINT64_CONSTANT (1000000)) + tv.tv_usec; - current_monotonic_time = - ts.tv_sec * G_GINT64_CONSTANT (1000000000) + ts.tv_nsec; - - return current_monotonic_time + 1000 * (ust - current_system_time); - } case COGL_GLX_UST_IS_MONOTONIC_TIME: return 1000 * ust; case COGL_GLX_UST_IS_OTHER: |