Skip to content

Commit efcdec1

Browse files
committed
Something's amiss with this change
1 parent 0dc8d3c commit efcdec1

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

Superbuild/BoostExternal.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ SET( boost_DEPENDENCIES )
4545
# explicitly set library list
4646
SET(boost_Libraries
4747
"atomic"
48+
"chrono"
4849
"date_time"
4950
"exception"
5051
"filesystem"
@@ -53,6 +54,7 @@ SET(boost_Libraries
5354
"serialization"
5455
"system"
5556
"thread"
57+
"timer"
5658
CACHE INTERNAL "Boost library name.")
5759

5860
IF(BUILD_WITH_PYTHON)

src/Interface/Application/ModuleWidget.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ bool ModuleWidget::executeWithSignals()
10961096
Q_EMIT signalExecuteButtonIconChangeToStop();
10971097
errored_ = false;
10981098
//colorLocked_ = true; //TODO
1099-
timer_.restart();
1099+
timer_.start();
11001100
theModule_->executeWithSignals();
11011101
if (!disabled_)
11021102
Q_EMIT updateProgressBarSignal(1);
@@ -1349,7 +1349,7 @@ void ModuleWidget::updateProgressBar(double percent)
13491349

13501350
void ModuleWidget::updateModuleTime()
13511351
{
1352-
fullWidgetDisplay_->getProgressBar()->setFormat(QString("%1 s : %p%").arg(timer_.elapsed()));
1352+
fullWidgetDisplay_->getProgressBar()->setFormat(QString("%1 s : %p%").arg(timer_.elapsed().wall));
13531353
}
13541354

13551355
void ModuleWidget::launchDocumentation()

src/Interface/Application/ModuleWidget.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <boost/shared_ptr.hpp>
3535
#include <boost/scoped_ptr.hpp>
3636
#include <boost/bimap.hpp>
37+
#include <boost/timer/timer.hpp>
3738
#include <deque>
3839
#include <atomic>
3940
#include <Interface/Application/Note.h>
@@ -259,7 +260,7 @@ private Q_SLOTS:
259260
ModuleWidgetDisplayPtr fullWidgetDisplay_;
260261
private:
261262
boost::shared_ptr<PortWidgetManager> ports_;
262-
//boost::timer timer_;
263+
boost::timer::cpu_timer timer_;
263264
bool deletedFromGui_, colorLocked_;
264265
bool executedOnce_, skipExecuteDueToFatalError_, disabled_, programmablePortEnabled_{false};
265266
std::atomic<bool> errored_;

src/Interface/Application/NetworkEditor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,7 @@ void NetworkEditor::centerView()
12861286
}
12871287

12881288
ModulePositions positions;
1289-
fillModulePositionMap(positions, []() { return true; });
1289+
fillModulePositionMap(positions, [](ModuleHandle) { return true; });
12901290
centerOn(findCenterOfNetwork(positions));
12911291
}
12921292

src/Interface/Application/NetworkExecutionProgressBar.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ void NetworkExecutionProgressBar::updateTotalModules(size_t count)
8383
progressBar_->setValue(0);
8484
}
8585
}
86+
8687
void NetworkExecutionProgressBar::incrementModulesDone(double execTime, const std::string& moduleId)
8788
{
8889
Guard g(mutex_.get());
@@ -92,7 +93,7 @@ void NetworkExecutionProgressBar::incrementModulesDone(double execTime, const st
9293
counterLabel_->setText(counterLabelString());
9394
progressBar_->setValue(numModulesDone_);
9495
totalExecutionTime_ += execTime;
95-
auto wallTime = executionTimer_.elapsed();
96+
auto wallTime = executionTimer_.elapsed().wall;
9697
//Green - completed modules\n??? - Unexecuted modules\nRed - errored modules\n
9798
progressBar_->setToolTip(QString("Total execution time: %1\nTotal wall time: %2")
9899
.arg(totalExecutionTime_).arg(wallTime));
@@ -109,7 +110,7 @@ void NetworkExecutionProgressBar::resetModulesDone()
109110
Guard g(mutex_.get());
110111
numModulesDone_ = 0;
111112
totalExecutionTime_ = 0;
112-
executionTimer_.restart();
113+
executionTimer_.stop();
113114
counterLabel_->setText(counterLabelString());
114115
progressBar_->setValue(numModulesDone_);
115116
progressBar_->setToolTip("");

src/Interface/Application/NetworkExecutionProgressBar.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <QProgressBar>
3535
#ifndef Q_MOC_RUN
3636
#include <Core/Utils/SmartPointers.h>
37+
#include <boost/timer/timer.hpp>
3738
#include <Core/Thread/Mutex.h>
3839
#endif
3940

@@ -97,7 +98,7 @@ class NetworkExecutionProgressBar : public QObject
9798
size_t totalModules_;
9899
double totalExecutionTime_;
99100
Core::Thread::Mutex mutex_;
100-
//boost::timer executionTimer_;
101+
boost::timer::cpu_timer executionTimer_;
101102
QString timingLog_;
102103
QTextStream timingStream_;
103104

0 commit comments

Comments
 (0)