allow custom time for hack loop
This commit is contained in:
parent
3c5a2576b4
commit
83e7e5ae32
1 changed files with 5 additions and 2 deletions
7
hack.py
7
hack.py
|
@ -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()
|
||||
|
|
Reference in a new issue