diff options
Diffstat (limited to 'hardinfo2/benchmark.c')
-rw-r--r-- | hardinfo2/benchmark.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hardinfo2/benchmark.c b/hardinfo2/benchmark.c index 6ab1a8af..746ec12d 100644 --- a/hardinfo2/benchmark.c +++ b/hardinfo2/benchmark.c @@ -86,9 +86,9 @@ gdouble benchmark_parallel_for(guint start, guint end, gpointer callback, gpointer callback_data) { gchar *temp; guint n_cores, iter_per_core, iter; + gdouble elapsed_time; GSList *threads = NULL, *t; GTimer *timer; - gdouble elapsed_time; timer = g_timer_new(); @@ -118,7 +118,7 @@ gdouble benchmark_parallel_for(guint start, guint end, thread = g_thread_create((GThreadFunc) benchmark_parallel_for_dispatcher, pbt, TRUE, NULL); - threads = g_slist_prepend(threads, thread); + threads = g_slist_append(threads, thread); DEBUG("thread %d launched as context %p", 1 + (iter / iter_per_core), threads->data); } @@ -135,7 +135,7 @@ gdouble benchmark_parallel_for(guint start, guint end, g_slist_free(threads); g_timer_destroy(timer); - DEBUG("finishing"); + DEBUG("finishing; all threads took %d seconds to finish", elapsed_time); return elapsed_time; } |