#ifndef READTHREAD_H #define READTHREAD_H #include #include #include "inputmanager.h" typedef QList> InputValues; class ReadThread : public QThread { Q_OBJECT public: explicit ReadThread(InputManager* input, const QList &channels, quint64 interval, QObject *parent = 0); inline __suseconds_t getTime() const; protected: void run(); signals: void newValues(InputValues values, quint64 timestamp); private: InputManager* m_input; QList m_channels; quint64 m_interval; }; __suseconds_t ReadThread::getTime() const { struct timeval time; gettimeofday(&time, NULL); return 1000000 * time.tv_sec + time.tv_usec; } Q_DECLARE_METATYPE(InputValues) #endif // READTHREAD_H