diff options
author | Sergiusz Bazanski <q3k@q3k.org> | 2018-07-21 21:44:40 +0100 |
---|---|---|
committer | Sergiusz Bazanski <q3k@q3k.org> | 2018-07-21 21:44:40 +0100 |
commit | 44f52234fb95ee3031f8ccea35e15b52c19e7b14 (patch) | |
tree | fa5da8ff1a17b39d48f0234e69fcce4727019a09 /gui | |
parent | 9e6deed3b839a2df92644f71bc6cbc1be4ea0480 (diff) | |
download | nextpnr-44f52234fb95ee3031f8ccea35e15b52c19e7b14.tar.gz nextpnr-44f52234fb95ee3031f8ccea35e15b52c19e7b14.tar.bz2 nextpnr-44f52234fb95ee3031f8ccea35e15b52c19e7b14.zip |
QTimer::start(std::chrono::duration -> int)
The chrono::duration-friendly method is availble from Qt 5.8 only.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/fpgaviewwidget.cc | 4 | ||||
-rw-r--r-- | gui/fpgaviewwidget.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gui/fpgaviewwidget.cc b/gui/fpgaviewwidget.cc index 86aae25d..9343419b 100644 --- a/gui/fpgaviewwidget.cc +++ b/gui/fpgaviewwidget.cc @@ -277,11 +277,11 @@ FPGAViewWidget::FPGAViewWidget(QWidget *parent) } connect(&paintTimer_, SIGNAL(timeout()), this, SLOT(update())); - paintTimer_.start(std::chrono::duration<int, std::milli>(1000 / 20)); // paint GL 20 times per second + paintTimer_.start(1000 / 20); // paint GL 20 times per second renderRunner_ = std::unique_ptr<PeriodicRunner>(new PeriodicRunner(this, [this] { renderLines(); })); renderRunner_->start(); - renderRunner_->startTimer(std::chrono::duration<int, std::milli>(1000 / 2)); // render line 2 times per second + renderRunner_->startTimer(1000 / 2); // render lines 2 times per second } FPGAViewWidget::~FPGAViewWidget() {} diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index 0d0ef89c..b87c5d0a 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -244,7 +244,7 @@ class PeriodicRunner : public QThread } } - void startTimer(std::chrono::milliseconds value) { timer_.start(value); } + void startTimer(int msecs) { timer_.start(msecs); } ~PeriodicRunner() { |