code: def held_time(self):
          
          if self._held_from is not None:
              return self.pin_factory.ticks_diff(self.pin_factory.ticks(),
                                                 self._held_from)
          else:
              return None
docs: The length of time (in seconds) that the device has been held for.
          This is counted from the first execution of the :attr:`when_held` event
          rather than when the device activated, in contrast to
          :attr:`~EventsMixin.active_time`. If the device is not currently held,
          this is :data:`None`.