MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / slotTransferSize

Method slotTransferSize

Plugins/FileTransfer/ListFileModel.cpp:179–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179void CFileTransfer::slotTransferSize(quint64 nAddSize)
180{
181 m_nTransferSize += nAddSize;
182 QDateTime tmCur = QDateTime::currentDateTime();
183 int nSec = m_tmLast.secsTo(tmCur);
184 if(nSec < 1) return;
185 m_fSpeed = ((float_t)(m_nTransferSize - m_nLastSize)) / (float_t)nSec;
186 m_tmLast = tmCur;
187 m_nLastSize = m_nTransferSize;
188}
189
190float_t CFileTransfer::GetSpeed()
191{

Callers 2

AsyncFileMethod · 0.80
LoadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected