00001 /* 00002 Free Download Manager Copyright (c) 2003-2007 FreeDownloadManager.ORG 00003 Open Download Manager Copyright (c) 2008-2010 OpenDownloadManager.ORG 00004 */ 00005 00006 #if !defined(AFX_FSSPEEDMETER_H__04BDDC02_9C84_4660_B261_00A72D42DDE0__INCLUDED_) 00007 #define AFX_FSSPEEDMETER_H__04BDDC02_9C84_4660_B261_00A72D42DDE0__INCLUDED_ 00008 00009 #include "fsTicksMgr.h" 00010 #if _MSC_VER > 1000 00011 #pragma once 00012 #endif 00013 00014 class fsSpeedMeter 00015 { 00016 public: 00017 00018 void Reset(); 00019 00020 void Done (DWORD dwDone); 00021 00022 DWORD GetSpeed(); 00023 00024 void SetInertness (int val); 00025 00026 fsSpeedMeter(); 00027 virtual ~fsSpeedMeter(); 00028 00029 protected: 00030 int m_cMeasures; 00031 DWORD m_dwSpeed; 00032 DWORD m_aPrevSpeed [10]; 00033 int m_iCurPrevSpeed; 00034 int m_iMaxPrevSpeed; 00035 00036 void UpdateSpeed(); 00037 00038 fsTicksMgr m_now; 00039 fsTicksMgr m_past; 00040 DWORD m_done; 00041 }; 00042 00043 #endif
1.5.6