diff --git a/kivy/_clock.pxd b/kivy/_clock.pxd index d065583f6..6dd96ba3f 100644 --- a/kivy/_clock.pxd +++ b/kivy/_clock.pxd @@ -95,6 +95,7 @@ cdef class CyClockBase(object): cdef public object _lock_acquire cdef public object _lock_release + cdef public int has_started cdef public int has_ended cdef public object _del_safe_lock cdef public int _del_safe_done diff --git a/kivy/_clock.pyx b/kivy/_clock.pyx index 6739d7ec1..450699bf1 100644 --- a/kivy/_clock.pyx +++ b/kivy/_clock.pyx @@ -260,6 +260,7 @@ cdef class CyClockBase(object): self._del_safe_lock = RLock() self._del_safe_done = False self.has_ended = False + self.has_started = False def start_clock(self): """Must be called to start the clock. @@ -268,7 +269,10 @@ cdef class CyClockBase(object): """ self._lock_acquire() try: - pass + if self.has_started: + return + + self.has_started = True # for now don't raise an exception when restarting because kivy's # graphical tests are not setup to handle clock isolation so they try # to restart the clock