Elisabetta
14th June 2018, 06:35
Hello,
I am using QT 5.8
On Windows I have no ploblems.
On Fedora 25 Using a qTimer set at 50 hz, the CPU usage rises to 90%.
If I reduce the frequency of the qTimer the CPU usage decreases considerably.
QTimer* m_timer; // in file .h
// in file .cpp
m_timer= new QTimer();
int interval = (1 / 50) * 1000;
m_timer->start(interval);
connect(m_timer SIGNAL(timeout()),
this, SLOT(slotRead()));
Can you give me some suggestions?
Thanks in advance!
Best Regards!
I am using QT 5.8
On Windows I have no ploblems.
On Fedora 25 Using a qTimer set at 50 hz, the CPU usage rises to 90%.
If I reduce the frequency of the qTimer the CPU usage decreases considerably.
QTimer* m_timer; // in file .h
// in file .cpp
m_timer= new QTimer();
int interval = (1 / 50) * 1000;
m_timer->start(interval);
connect(m_timer SIGNAL(timeout()),
this, SLOT(slotRead()));
Can you give me some suggestions?
Thanks in advance!
Best Regards!