MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / Update

Method Update

FastCopy/ProcessIoCounter.cpp:14–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14ProcessIoCounter::IOCounterDiff ProcessIoCounter::Update()
15{
16 if (!GetProcessIoCounters(m_handle, m_counterCur))
17 return {};
18
19 IOCounterDiff const diff
20 {
21 m_counterCur->ReadTransferCount - m_counterPrev->ReadTransferCount,
22 m_counterCur->WriteTransferCount - m_counterPrev->WriteTransferCount,
23 std::chrono::steady_clock::now() - m_lastUpdate
24 };
25 std::swap(m_counterPrev, m_counterCur);
26 m_lastUpdate = std::chrono::steady_clock::now();
27 return diff;
28}
29
30ProcessIoCounter::IOCounter ProcessIoCounter::GetTotal()
31{

Callers 1

StartMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected