summaryrefslogtreecommitdiff
path: root/perf/cairo-perf.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-08-31 11:02:20 -0700
committerCarl Worth <cworth@cworth.org>2006-08-31 11:02:20 -0700
commitb9f629d54239c43eef4746293bcffd58ada442f2 (patch)
tree671f2ac1317389c079f3b1f736ad08b9034318ae /perf/cairo-perf.c
parent13bcba68ae6f0d29b82def09e7a6e356266dc2e7 (diff)
perf: Don't require a separate counter from the timer for perf loops.
Diffstat (limited to 'perf/cairo-perf.c')
-rw-r--r--perf/cairo-perf.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/perf/cairo-perf.c b/perf/cairo-perf.c
index e69bb2bf..780cc889 100644
--- a/perf/cairo-perf.c
+++ b/perf/cairo-perf.c
@@ -29,7 +29,7 @@
int cairo_perf_duration = -1;
-int alarm_expired = 0;
+int cairo_perf_alarm_expired = 0;
typedef struct _cairo_perf {
const char *name;
@@ -81,27 +81,21 @@ target_is_measurable (cairo_test_target_t *target)
}
void
-start_timing (bench_timer_t *tr, long *count) {
+start_timing (bench_timer_t *tr) {
if (cairo_perf_duration == -1) {
if (getenv("CAIRO_PERF_DURATION"))
cairo_perf_duration = strtol(getenv("CAIRO_PERF_DURATION"), NULL, 0);
else
cairo_perf_duration = 5;
}
- *count = 0;
+ tr->count = 0;
timer_start (tr);
set_alarm (cairo_perf_duration);
}
void
-stop_timing (bench_timer_t *tr, long count) {
+stop_timing (bench_timer_t *tr) {
timer_stop (tr);
- tr->count = count;
-}
-
-double
-timing_result (bench_timer_t *tr) {
- return tr->count / timer_elapsed (tr);
}
int