blob: 7b9d3ae9371fdbaecc646f89176f37387a41e803 (
plain) (
tree)
|
|
#ifndef NETWORKSPEED_H_
#define NETWORKSPEED_H_
#include "idatasource.h"
#include <QElapsedTimer>
#include <QFile>
class NetworkSpeed : public IDataSource {
public:
NetworkSpeed();
virtual ~NetworkSpeed();
virtual qint64 read();
virtual const QList<qint64>& getBars() const;
virtual qint64 getMaximum();
private:
qint64 _lastBytes;
qint64 _lastMs;
QElapsedTimer _timer;
QFile* _file;
};
#endif /* NETWORKSPEED_H_ */
|