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.

50 lines
644 B

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. timeseq.cpp
  5. Abstract:
  6. SIS Groveler time sequencer
  7. Authors:
  8. John Douceur, 1998
  9. Environment:
  10. User Mode
  11. Revision History:
  12. --*/
  13. #include "all.hxx"
  14. #if TIME_SEQUENCE_VIRTUAL
  15. unsigned int TimeSequencer::virtual_time = 0;
  16. void
  17. TimeSequencer::VirtualSleep(
  18. unsigned int sleep_time)
  19. {
  20. ASSERT(signed(sleep_time) >= 0);
  21. virtual_time += sleep_time;
  22. }
  23. unsigned int
  24. TimeSequencer::GetVirtualTickCount()
  25. {
  26. virtual_time++;
  27. unsigned int reported_time = 10 * (virtual_time / 10);
  28. ASSERT(reported_time % 10 == 0);
  29. return reported_time;
  30. }
  31. #endif // TIME_SEQUENCE_VIRTUAL