Dernière activité 1743119100

eontimer_to_flowtimer.py Brut
1# one of the first python scripts i made yipee
2
3from math import floor
4
5FRAME_RATE = 59.8261
6TARGET_SEC = int(input("Target Seconds: "))
7TARGET_DELAY = int(input("Target Delay: "))
8CALIBRATED_DELAY = int(input("Calibrated Delay: "))
9CALIBRATED_SECONDS = int(input("Calibrated Seconds: "))
10ONE_MIN = 60000
11MINIMUM_TIME_MS = 14000
12PRETIMER = 5000
13
14
15def toms(ms):
16 return floor(ms / FRAME_RATE)
17
18
19secondTimer = (toms(TARGET_DELAY * 1000 - CALIBRATED_DELAY * 1000) + CALIBRATED_SECONDS * 1000)
20firstTimer = ((TARGET_SEC*1000 - secondTimer) % ONE_MIN + 200 )
21secondTimer += 5000
22firstTimer += 5000
23
24if firstTimer < MINIMUM_TIME_MS:
25 firstTimer = firstTimer + ONE_MIN
26
27
28minutesBefore = floor((firstTimer + secondTimer) / ONE_MIN)
29
30print(f'{secondTimer}/{firstTimer}/{PRETIMER}\nMinutes Before Target: {minutesBefore}')