docs: def next_future_periodic_delta(self) -> Optional[float]:
          """Give the amount of seconds before the next periodic task is due."""
          rv = self._r.zrangebyscore(
              self._to_namespaced(PERIODIC_TASKS_QUEUE_KEY),
              '-inf', '+inf', start=0, num=1, withscores=True,
              score_cast_func=int
          )
          if not rv:
              return None
  
          now = datetime.now(timezone.utc).timestamp()
          next_event_time = rv[0][1]
          if next_event_time < now:
              return 0
  
          return next_event_time - now