[cogl/wip/frame-synchronization] Don't convert gettimeofday() UST values
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/frame-synchronization] Don't convert gettimeofday() UST values
- Date: Mon, 28 Jan 2013 17:28:47 +0000 (UTC)
commit bc58d14ce826c1e54eda0138a549474fa026023d
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Jan 28 12:26:33 2013 -0500
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().
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 895b612..0499914 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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]