This commit is contained in:
BarsTiger
2021-06-11 13:49:13 +03:00
parent b375c12f69
commit 36c7ceaabc
2 changed files with 3 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ except:
subprocess.check_call([sys.executable, "-m", "pip", "install", 'playsound']) subprocess.check_call([sys.executable, "-m", "pip", "install", 'playsound'])
from playsound import playsound from playsound import playsound
print("You can change alarm sound: just reneame your sound to alarm.mp3 and copy it to SuperTimer folder")
superSecond = float(input("Print how many real seconds will be in superSecond: ")) superSecond = float(input("Print how many real seconds will be in superSecond: "))
timeInSuperSeconds = int(input("Timer in superSeconds: ")) timeInSuperSeconds = int(input("Timer in superSeconds: "))
@@ -20,3 +21,5 @@ while timeInSuperSeconds > 0:
print('Time remaining: {{:{:}}} seconds'.format(width).format(timeInSuperSeconds), end='\r') print('Time remaining: {{:{:}}} seconds'.format(width).format(timeInSuperSeconds), end='\r')
timeInSuperSeconds -= 1 timeInSuperSeconds -= 1
time.sleep(superSecond) time.sleep(superSecond)
playsound("alarm.mp3")

Binary file not shown.