We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 818da9e + a9484d4 commit 0fa57e4Copy full SHA for 0fa57e4
src/etc/lldb_batchmode.py
@@ -139,11 +139,17 @@ def listen():
139
def start_watchdog():
140
"""Starts a watchdog thread that will terminate the process after a certain
141
period of time"""
142
- watchdog_start_time = time.clock()
+
143
+ try:
144
+ from time import clock
145
+ except ImportError:
146
+ from time import perf_counter as clock
147
148
+ watchdog_start_time = clock()
149
watchdog_max_time = watchdog_start_time + 30
150
151
def watchdog():
- while time.clock() < watchdog_max_time:
152
+ while clock() < watchdog_max_time:
153
time.sleep(1)
154
print("TIMEOUT: lldb_batchmode.py has been running for too long. Aborting!")
155
thread.interrupt_main()
0 commit comments