57 , m_total(0), m_pos(0), m_lastPos(0), m_parSec(0.0), m_lastParSec(0.0), m_previousResult(-1)
65 void Start(LONGLONG total = 100)
74 m_previousResult = -1;
75 m_previousTick.
Reset();
87 m_previousResult = -1;
88 m_previousTick.
Reset();
107 void Set(LONGLONG pos, LONGLONG total)
169 double p = double(m_pos) / double(m_total);
185 int pr = m_previousResult;
187 m_previousResult = r;
197 int rr = (r + pr) / 2;
217 if ( m_pos >= m_total )
226 if ( lp >= m_recheckInverval )
230 double d =
static_cast<double>(m_pos - m_lastPos);
233 m_lastParSec = m_parSec;
237 if ( m_parSec > 0.0 )
239 double r =
static_cast<double>(m_total - m_pos);
240 if ( m_lastParSec > 0.0 )
242 r /= (m_parSec + m_lastParSec) / 2.0;
252 UINT r =
static_cast<UINT
>(passed * m_total / m_pos - passed);
253 if ( r < m_recheckInverval )
268 DWORD m_recheckInverval;
271 int m_previousResult;
void operator++(void)
[設定] 進捗
void operator++(int)
[設定] 進捗
LONGLONG GetPos(void) const
[取得] 進捗値取得
void operator+=(LONGLONG d)
[設定] 進捗
void Start(LONGLONG total=100)
[開始] 開始.
double GetRate(void) const
[取得] 経過割合取得
CProgressTime(DWORD ri=5)
コンストラクタ.
void Resume(void)
[設定] レジューム.
void SetPos(LONGLONG pos)
[設定] 進捗
void Set(LONGLONG pos, LONGLONG total)
[設定] 進捗、全体値設定
LONGLONG GetTotal(void) const
[取得] 全体値取得
int EstimateRemainingSecond(void)
[計算] 残り時間計算
int _deprecated EstimateRemainingTime(void)
[計算] 残り時間計算
bool IsPassedAndReset(DWORD dwTime, bool isNow=true)
[確認] 経過確認&リセット.
DWORD GetPassedCount(void) const
[取得] 経過時間取得.
void Reset(void)
[設定] リセット.