/
see.py
42 lines (35 loc) · 924 Bytes
/
see.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
import datetime
import time
sl=[]
tl=[]
startTime = ''
class timeTool:
def runTime(self):
global startTime
startTime = datetime.datetime.now()
return
def datetimeConverter(self):
global tl
self.runTime()
#print(type(startTime))
startTimestring = str(startTime)
startTimelist = startTimestring.split()
tS = list(map(float,startTimelist[1].split(':')))
csT= tS[0]*3600+tS[1]*60+tS[2]
tl.append(csT)
#print(tl)
print('The Current Time Is ' + str(startTime))
return
def ProcessingTime(self):
self.datetimeConverter()
tdc = tl[1]-tl[0]
print('It Took ' + str(tdc) + ' Seconds To Do This')
if tdc>2:
print("<<<<<<<<<<<<<THIS TOOK A LONG TIME>>>>>>>>>>>>>>>")
del tl[:]
return
'''
d = timeTool()
d.datetimeConverter()
d.ProcessingTime()
'''