SapPerformance.h 576 B

1234567891011121314151617181920212223242526272829
  1. #ifndef _SAPPERFORMANCE_H_
  2. #define _SAPPERFORMANCE_H_
  3. // SapPerformance.h : header file
  4. //
  5. #include "SapClassBasicDef.h"
  6. class SAPCLASSBASIC_CLASS SapPerformance
  7. {
  8. public:
  9. SapPerformance();
  10. void Reset();
  11. float GetTime(BOOL bReset) { return ComputeTime(bReset) * 1.0f; }
  12. float GetTimeMilli(BOOL bReset) { return ComputeTime(bReset) * 1000.0f; }
  13. float GetTimeMicro(BOOL bReset) { return ComputeTime(bReset) * 1000000.0f; }
  14. protected:
  15. float ComputeTime(BOOL bReset);
  16. protected:
  17. LONGLONG m_CounterFrequency;
  18. LONGLONG m_ResetTime;
  19. };
  20. #endif // _SAPPERFORMANCE_H_