qt4下的定时器使用及精度评估

由于要使用定时器定时采集数据,想用qt的定时器采集1000hz的信号(qt的定时器精度位ms级)废话不多,先上代码如下:
timer_thread.h代码

#ifndef TIMER_THREAD_H
#define TIMER_THREAD_H
#include 
#include 

class TimerThread : public QThread
{
   
    Q_OBJECT

public:
    TimerThread(QObject *parent = 0);
protected:
    void run();
private slots:
    void timeoutSlot();
private:
    QTimer* m_pTimer;
};

你可能感兴趣的:(linux,ARM,qt)