added a dedicated sleep function

This commit is contained in:
deadvey
2026-04-01 18:27:39 +01:00
parent a912836c07
commit aff8a8dd43
4 changed files with 19 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ def words(config, engine):
engine.say(word)
engine.runAndWait()
# Break between words as determined by the wpm
time.sleep(1/(config['wpm']/60))
maths.sleep(config['wpm'])
# TIMED #
def timed(config, engine):
@@ -46,8 +46,7 @@ def timed(config, engine):
print(f'{word} ')
engine.runAndWait()
# Break between words as determined by the wpm
time.sleep(1/(config['wpm']/60))
maths.sleep(config['wpm'])
# check if too much time has elapsed for mode: time
now = time.time()
# Break condition
@@ -73,7 +72,7 @@ def quote(config, engine):
engine.say(word)
engine.runAndWait()
# Break between words as determined by the wpm
time.sleep(1/(config['wpm']/60))
maths.sleep(config['wpm'])
# FILE #
def file(config, engine):
@@ -93,4 +92,4 @@ def file(config, engine):
engine.say(word)
engine.runAndWait()
# Break between words as determined by the wpm
time.sleep(1/(config['wpm']/60))
maths.sleep(config['wpm'])