summaryrefslogtreecommitdiff
path: root/tests/spec/glx_oml_sync_control
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-11-21 20:47:05 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2014-12-03 13:05:49 +0000
commitd28035dd90be744bb693eb58fa2f677d33293115 (patch)
treeafce0a3b46bb1e9041f730e3d196bdbf4cd05cb8 /tests/spec/glx_oml_sync_control
parente17c0978083dfd96f40ca4b00480ef77cc0147b2 (diff)
util: convert piglit_getmicroseconds to piglit_time_get_nano
This way we can actually reuse it in {arb,ext}_timer_query Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'tests/spec/glx_oml_sync_control')
-rw-r--r--tests/spec/glx_oml_sync_control/timing.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/spec/glx_oml_sync_control/timing.c b/tests/spec/glx_oml_sync_control/timing.c
index 7fbcf4439..b4d0302c8 100644
--- a/tests/spec/glx_oml_sync_control/timing.c
+++ b/tests/spec/glx_oml_sync_control/timing.c
@@ -64,7 +64,7 @@ draw(Display *dpy)
{
enum piglit_result result = PIGLIT_PASS;
int64_t last_ust = 0xd0, last_msc = 0xd0, last_sbc = 0xd0;
- int64_t last_timestamp = -1;
+ int64_t last_timestamp = -1; /* in nano seconds */
struct stats msc_wallclock_duration_stats = {};
struct stats msc_ust_duration_stats = {};
double expected_msc_wallclock_duration = 0.0;
@@ -98,7 +98,7 @@ draw(Display *dpy)
for (i = 0; i < loops; i++) {
int64_t new_ust = 0xd0, new_msc = 0xd0, new_sbc = 0xd0;
int64_t check_ust = 0xd0, check_msc = 0xd0, check_sbc = 0xd0;
- int64_t new_timestamp;
+ int64_t new_timestamp; /* in nano seconds */
int64_t expected_msc, target_sbc;
int64_t target_msc = 0;
@@ -143,7 +143,7 @@ draw(Display *dpy)
result = PIGLIT_FAIL;
}
}
- new_timestamp = piglit_get_microseconds();
+ new_timestamp = piglit_time_get_nano();
if (!glXGetSyncValuesOML(dpy, win,
&check_ust, &check_msc, &check_sbc))
@@ -219,7 +219,7 @@ draw(Display *dpy)
update_stats(
&msc_wallclock_duration_stats,
(new_timestamp - last_timestamp)
- / delta_msc);
+ / (delta_msc*1000));
}
}
}