Leaked source code of windows server 2003
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.

44 lines
1.0 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: util.hxx
  3. *
  4. * Utility classes
  5. *
  6. * Copyright (c) 1996 Microsoft Corporation
  7. *
  8. \**************************************************************************/
  9. #ifndef __util_hxx__
  10. #define __util_hxx__
  11. #if 0
  12. class SS_TIME {
  13. public:
  14. SS_TIME() { Zero(); };
  15. double Seconds();
  16. void Update();
  17. void Zero();
  18. SS_TIME operator+( SS_TIME addTime );
  19. SS_TIME operator-( SS_TIME subTime );
  20. SS_TIME operator+=( SS_TIME addTime );
  21. SS_TIME operator-=( SS_TIME subTime );
  22. operator double() { return seconds; };
  23. operator float() { return (float) seconds; };
  24. operator int() { return (int) (seconds + 0.5); };
  25. private:
  26. double seconds;
  27. };
  28. class SS_TIMER {
  29. public:
  30. SS_TIMER() { Reset(); };
  31. void Start();
  32. SS_TIME Stop();
  33. void Reset();
  34. SS_TIME ElapsedTime();
  35. private:
  36. SS_TIME startTime;
  37. SS_TIME elapsed;
  38. };
  39. #endif
  40. #endif // __util_hxx__