From 103d891325cd86e2f70ec27052d5b504546211a0 Mon Sep 17 00:00:00 2001 From: Alexander Kojevnikov Date: Thu, 26 Aug 2010 20:52:19 +1000 Subject: [PATCH] Log the analysis time --- src/spek-pipeline.vala | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/spek-pipeline.vala b/src/spek-pipeline.vala index 8e01fe3..6dd1b52 100644 --- a/src/spek-pipeline.vala +++ b/src/spek-pipeline.vala @@ -130,6 +130,9 @@ namespace Spek { } private void * reader_func () { + var timeval = TimeVal (); + timeval.get_current_time (); + int pos = 0, prev_pos = 0; int block_size = cx.width * cx.channels / 8; int size; @@ -166,6 +169,11 @@ namespace Spek { reader_sync (-1); worker_thread.join (); + var newval = TimeVal (); + newval.get_current_time (); + long ms = (newval.tv_sec - timeval.tv_sec) * 1000 + + (newval.tv_usec - timeval.tv_usec) / 1000; + print ("%i ms\n", (int) ms); return null; }