質問編集履歴
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -96,11 +96,17 @@
|
|
96
96
|
|
97
97
|
now = datetime.now()
|
98
98
|
|
99
|
-
|
99
|
+
try:
|
100
100
|
|
101
|
-
|
101
|
+
if abs(now - list(end)[0]) >= timedelta(seconds=1):
|
102
102
|
|
103
|
+
print("終了")
|
104
|
+
|
103
|
-
sys.exit()
|
105
|
+
sys.exit()
|
106
|
+
|
107
|
+
except:
|
108
|
+
|
109
|
+
pass
|
104
110
|
|
105
111
|
|
106
112
|
|
1
修正した
test
CHANGED
File without changes
|
test
CHANGED
@@ -80,9 +80,41 @@
|
|
80
80
|
|
81
81
|
|
82
82
|
|
83
|
+
### 追記
|
84
|
+
|
85
|
+
```
|
86
|
+
|
87
|
+
def lineBot(op):
|
88
|
+
|
89
|
+
if op.type == 0:
|
90
|
+
|
91
|
+
def timer():
|
92
|
+
|
93
|
+
print("開始")
|
94
|
+
|
95
|
+
end = []
|
96
|
+
|
97
|
+
now = datetime.now()
|
98
|
+
|
99
|
+
if abs(now - list(end)[0]) >= timedelta(seconds=1):
|
100
|
+
|
101
|
+
print("終了")
|
102
|
+
|
103
|
+
sys.exit()
|
83
104
|
|
84
105
|
|
85
106
|
|
107
|
+
end = set([now])
|
108
|
+
|
109
|
+
print(list(end)[0])
|
110
|
+
|
111
|
+
threading.Timer(5, timer)
|
112
|
+
|
113
|
+
return lineBot
|
114
|
+
|
115
|
+
timer()
|
116
|
+
|
117
|
+
```
|
86
118
|
|
87
119
|
|
88
120
|
|