诸暨麻将添加redis
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.
 
 
 
 
 
 

29 regels
484 B

  1. #pragma once
  2. //精确计时 微秒级别
  3. class CTimer
  4. {
  5. public:
  6. CTimer()
  7. {
  8. QueryPerformanceFrequency(&m_Frequency);
  9. Start();
  10. }
  11. ~CTimer();
  12. void Start()
  13. {
  14. QueryPerformanceCounter(&m_StartCount);
  15. }
  16. double End()
  17. {
  18. LARGE_INTEGER CurrentCount;
  19. QueryPerformanceCounter(&CurrentCount);
  20. return double(CurrentCount.LowPart - m_StartCount.LowPart) / (double)m_Frequency.LowPart;
  21. }
  22. private:
  23. LARGE_INTEGER m_Frequency;
  24. LARGE_INTEGER m_StartCount;
  25. };