def showtime(instance):
global currentline
global timepassed
global time1111
time1 = datetime.datetime.now()
time11 = time1.strftime('%H:%M')
time111 = str(time11)
time1111 = time111.replace(":", "")
currentline = BoxLayout()
timestart = IncrediblyCrudeClock()
start_time = time.time()
Clock.schedule_once(timestart.update)
currentline.add_widget(timestart)
event()
layout.remove_widget(instance)
layout.add_widget(button_stop)
layout.add_widget(currentline)
def hidetime(instance):
global timepassed
global start_time
global time1111
time2 = datetime.datetime.now()
time22 = time2.strftime("%H:%M")
time222 = str(time22)
time2222 = time222.replace(":", "")
def one_f():#КОНЕЦ ПОКАЗА ВРЕМЕНИ
global time4
global time2
time4 = time.time()
time2 = str(time.ctime(time4).split()[3][:5])
min_start = time1.replace(":", " ").split()
min_end = time2.replace(":", " ").split()
if min_end[1] == '00' and min_start == '00':
timepassed = 0
elif min_end[1] == '00':
timepassed = int(60 - int(min_start[1]))
elif int(min_end[1]) < int(min_start[1]):
timepassed = 60 - int(min_start[1]) + int(min_end[1])
else:
timepassed = int(min_end[1]) - int(min_start[1])
def two_f():#НАЧАЛО ПОКАЗА ВРЕМЕНИ
global time3
global time1
time3 = time.time()
time1 = str(time.ctime(time3).split()[3][:5])