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.

22 lines
363 B

  1. """
  2. Python file for Processor test suite
  3. Short 1s loop which purposefully ignores
  4. Keyboard Interrupts in order to continue
  5. executing
  6. """
  7. import time
  8. import signal
  9. def ignored_it(*args):
  10. print("Ignoring Ctrl+BREAK!")
  11. signal.signal(signal.SIGBREAK, ignored_it)
  12. end = time.time() + 0.5
  13. while time.time() < end:
  14. print(time.time())
  15. time.sleep(0.01)