PicoVoice added + Hogwarts Legacy assistent test

This commit is contained in:
Abraham 2023-03-28 19:03:36 +05:00
parent 0beb0ee926
commit e456d647db
20 changed files with 274 additions and 1 deletions

15
utils/time.py Normal file
View file

@ -0,0 +1,15 @@
import time
def sleep(duration, get_now=time.perf_counter):
"""
Custom sleep function that works more accurate then time.sleep does.
Taken from: https://stackoverflow.com/a/60185893/3684575
:param duration: Duration to sleep (in seconds).
:param get_now: Function to retrieve current time (time.perf_counter by default)
:return:
"""
now = get_now()
end = now + duration
while now < end:
now = get_now()