Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
720 B

  1. //=======================================================================
  2. //
  3. // Copyright (c) 1999 Microsoft Corporation. All Rights Reserved.
  4. //
  5. // File: speed.h
  6. //
  7. // Purpose: Connection speed tracker
  8. //
  9. //=======================================================================
  10. #ifndef _SPEED_H
  11. #define _SPEED_H
  12. #include <windows.h>
  13. class CConnSpeed
  14. {
  15. public:
  16. // size in bytes and time in milliseconds
  17. static void Learn(DWORD dwBytes, DWORD dwTime);
  18. static DWORD BytesPerSecond();
  19. static void ReadFromRegistry();
  20. static void WriteToRegistry();
  21. private:
  22. static DWORD m_dwBytesSoFar;
  23. static DWORD m_dwTimeSoFar;
  24. static DWORD m_dwAverage;
  25. static DWORD m_dwNewWeightPct;
  26. };
  27. #endif // _SPEED_H