Я попытался сделать секундомер, используя datetime и метод Clock.schedule_interval, чтобы напечатать обратный отсчет, но по какой-то причине он не работает
#the aim of this code is to make the computer print the reading on the stopwatch will the clock is
#scheduling
from kivy.uix.label import Label
from kivy.clock import Clock
from kivy.app import App
import datetime
class Bellaciao():
tl = datetime.datetime(2020,4,14,0,0,0)
d = datetime.timedelta(seconds=1)
#this is the method that performs the logic
def tik(self):
self.tl+=self.d
print(self.tl.time())
class MsApp(App):
c=Bellaciao()
def build(self):
self.c = Bellaciao()
*#This is where I called the method*
Clock.schedule_interval( self.c.tik(),1)
return self.c.tik()
MsApp().run()