From 278a59e24ad10c0c42b0b58ae81ab829a8cde93f Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Fri, 31 Aug 2012 17:45:55 -0400 Subject: [PATCH] Now that we fixed sync issues, we should have better timings... --- Core/src/ThreadGroup.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Core/src/ThreadGroup.cpp b/Core/src/ThreadGroup.cpp index d114ccf..fae2f5c 100644 --- a/Core/src/ThreadGroup.cpp +++ b/Core/src/ThreadGroup.cpp @@ -132,16 +132,13 @@ void ThreadGroup::Join() { m_FinishCV->wait(lock); } + m_StopWatch.Stop(); + for(int i = 0; i < m_ActiveThreads; i++) { m_ThreadHandles[i]->join(); delete m_ThreadHandles[i]; } - // !FIXME! This will also take the thread deletion into account. We - // should really be using better synchronization to actually only - // measure how long it takes for all threads to finish execution. - m_StopWatch.Stop(); - // Reset active number of threads... m_ActiveThreads = 0; }