From 17bde044aceadf9484d9ac999e8d4b9b2381f9c8 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 17 Jul 2013 12:09:28 +0100 Subject: rendering timer --- rotord/rotor.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'rotord/rotor.cpp') diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp index a1163fe..f1c9575 100755 --- a/rotord/rotor.cpp +++ b/rotord/rotor.cpp @@ -211,6 +211,11 @@ bool Video_output::render(const float duration, const float framerate,const stri //25fps video and 43.06640625fps audio? hmm //how to get the timecodes correct for the interleaved files + struct timeval start, end; + + gettimeofday(&start, NULL); + + float vstep=1.0f/framerate; float v=0.0f; float vf=0.0f; @@ -246,7 +251,12 @@ bool Video_output::render(const float duration, const float framerate,const stri } exporter.finishRecord(); - cerr << "Rotor: Video_output finished "<< endl; + + gettimeofday(&end, NULL); + + float mtime = ((end.tv_sec-start.tv_sec) + (end.tv_usec-start.tv_usec)/1000000.0) + 0.5; + + printf("Rotor Video_output: rendered in %02f seconds\n", mtime); if (usingaudio) audioloader.close(); -- cgit v1.2.3