RateMeasure.h
资源名称:GGBT.rar [点击查看]
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:1k
源码类别:
P2P编程
开发平台:
Visual C++
- // RateMeasure.h: interface for the CRateMeasure class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_RATEMEASURE_H__3C7C455F_79AD_4619_A855_E98B33F63D60__INCLUDED_)
- #define AFX_RATEMEASURE_H__3C7C455F_79AD_4619_A855_E98B33F63D60__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CStorageWrapper;
- class CRateMeasure
- {
- public:
- CRateMeasure(BLONG lAmountLeft, CStorageWrapper* pStorageWrapper);
- virtual ~CRateMeasure();
- void update(long ltime, long lAmount);
- BLONG get_size_left();
- long get_time_left();
- void data_rejected(long lAmount);
- void data_came_in(long lAmount);
- long m_lStart;
- long m_lLast;
- float m_fRate;
- long m_lRemaining;
- BLONG m_lLeft;
- bool m_bBroke;
- bool m_bGotAnything;
- CStorageWrapper* m_pStorageWrapper;
- };
- void RateMeasureTest();
- #endif // !defined(AFX_RATEMEASURE_H__3C7C455F_79AD_4619_A855_E98B33F63D60__INCLUDED_)