allow custom time for hack loop

This commit is contained in:
Mylloon 2023-03-31 19:42:10 +02:00
parent 3c5a2576b4
commit 83e7e5ae32
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -92,11 +92,14 @@ class Hack():
return local_element
def hack_loop(self, method):
def hack_loop(self, method, time: float | None = None):
"""Run the hack loop"""
if time == None:
time = self.wait_time
while True:
# Reduce CPU usage
sleep(self.wait_time)
sleep(time)
# Cheat
method()