Add sleep during wait to prevent maxing CPU.

This commit is contained in:
Danielle Jenkins 2019-11-05 19:16:08 -08:00
parent 28e3be4044
commit 78ff854059

View File

@ -30,6 +30,7 @@
import os
import sys
import time
import errno
import ctypes
import argparse
@ -473,6 +474,7 @@ class RCMHax:
if wait_for_device:
print("Waiting for a TegraRCM device to come online...")
while self.dev is None:
time.sleep(0.5)
self.dev = self._find_device(vid, pid)
# ... or bail out.