spek

Acoustic spectrum analyser
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

commit 103d891325cd86e2f70ec27052d5b504546211a0
parent b78f86349778ccfdc7f7ffd3b0ff41b947583166
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Thu, 26 Aug 2010 20:52:19 +1000

Log the analysis time

Diffstat:
Msrc/spek-pipeline.vala | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git 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; }