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.

53 lines
1.2 KiB

  1. //**************************************************************************
  2. //
  3. // Title : CTime.h
  4. //
  5. // Date : 1998.01.27 1st making
  6. //
  7. // Author : Toshiba [PCS](PSY) Hideki Yagi
  8. //
  9. // Copyright 1997 Toshiba Corporation. All Rights Reserved.
  10. //
  11. // -------------------------------------------------------------------------
  12. //
  13. // Change log :
  14. //
  15. // Date Revision Description
  16. // ------------ ---------- -----------------------------------------------
  17. // 1998.01.27 000.0000 1st making.
  18. //
  19. //**************************************************************************
  20. class CTickTime
  21. {
  22. enum TimeState
  23. {
  24. StopState = 0,
  25. PauseState,
  26. RunState
  27. };
  28. public:
  29. BOOL GetStreamTime( ULONGLONG *time );
  30. ULONGLONG GetStreamTime( void );
  31. BOOL GetStreamSTC( DWORD *time );
  32. DWORD GetStreamSTC( void );
  33. BOOL SetStreamTime( ULONGLONG time );
  34. BOOL Stop( void );
  35. BOOL Pause( void );
  36. BOOL Run( void );
  37. BOOL SetRate( DWORD rate );
  38. CTickTime( void );
  39. ~CTickTime( void );
  40. ULONGLONG GetSystemTime();
  41. private:
  42. void CalcDiffTime( void );
  43. ULONGLONG m_StreamTime;
  44. ULONGLONG m_SamplingTime;
  45. TimeState m_TimeState;
  46. DWORD m_Rate;
  47. };