3 DataStore::DataStore() {
7 DataStore::~DataStore() {
11 void DataStore::process(Comm::Packet
*packet
) {
12 uint64_t timestamp
= reinterpret_cast<uint64_t *>(packet
->data())[0];
13 uint64_t cpuTime
= reinterpret_cast<uint64_t *>(packet
->data())[1];
15 if(m_firstTime
== 0.0) {
16 m_firstTime
= timestamp
;
19 double value
= double(cpuTime
-m_lastCpuTime
) / (timestamp
- m_lastTime
);
20 m_dataList
.push_back(QPair
<double, double>(timestamp
- m_firstTime
, value
));
23 m_lastTime
= timestamp
;
24 m_lastCpuTime
= cpuTime
;