-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathautoTimeMode.py
43 lines (31 loc) · 1.24 KB
/
autoTimeMode.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import time
from coreFunc import coreFunc as coreFunc
import globalVars
stale = [False,False,False,False,False,False]
def timeClassComparer(hours,mins,arrayIndex,globalVarHere):
year, month, day, hour, min = map(int, time.strftime("%Y %m %d %H %M").split())
if ((hour==hours) and (min== mins)):
if stale[arrayIndex]==False:
coreFunc(globalVarHere)
stale[arrayIndex]=True
else:
pass
def autoTimeModee():
print("I will take care of the classes myself, Tejas.")
while(True):
# year, month, day, hour, min = map(int, time.strftime("%Y %m %d %H %M").split())
# if ((hour==11) and (min== 18)):
# if stale[0]==False:
# coreFunc(globalVars.x1)
# stale[0]=True
# else:
# pass
timeClassComparer(10,2,0,globalVars.x1)
timeClassComparer(10,57,1,globalVars.x2)
timeClassComparer(11,52,2,globalVars.x3)
timeClassComparer(13,12,3,globalVars.x4)
timeClassComparer(14,7,4,globalVars.x5)
timeClassComparer(15,2,5,globalVars.x6)
# #test
# timeClassComparer(13,21,1,globalVars.x2) #WORKING!
# autoTimeModee()