MCPcopy Create free account
hub / github.com/NatLabRockies/SAM / GetPercent

Method GetPercent

src/simulation.cpp:1664–1683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1662 return m_current;
1663 }
1664 float GetPercent( wxString *update = 0) {
1665 size_t ns = Size();
1666 size_t cur = Current();
1667 wxMutexLocker _lock(m_percentLock);
1668 float curper = m_percent;
1669
1670 if ( update != 0 )
1671 *update = m_update;
1672
1673 if ( ns == 0 ) return 0.0f;
1674
1675 if ( cur < ns )
1676 {
1677 float each = 100/ns;
1678 float overall = cur*each + 0.01*curper*each;
1679 return overall;
1680 }
1681 else
1682 return 100.0f;
1683 }
1684
1685 void Cancel()
1686 {

Callers 3

DispatchThreadsMethod · 0.45
DispatchSSCThreadsMethod · 0.45
fcall_wavetoolkitFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected