parameters: (self)
docstring: Return time until the next task should be executed, if any task is scheduled
docstring_summary: Return time until the next task should be executed, if any task is scheduled
docstring_tokens: Return time until the next task should be executed if any task is scheduled
function: def _sleep_time_until_next_task(self) -> float:
          "Return time until the next task should be executed, if any task is scheduled"
          next_task = self._next_task()
          if next_task is None:
              return 0
          else:
              _, start_time = next_task
              return start_time + self.timeout_ms / 1000.0 - perf_counter()
function_tokens: def _sleep_time_until_next_task ( self ) -> float : next_task = self . _next_task ( ) if next_task is None : return 0 else : _ , start_time = next_task return start_time + self . timeout_ms / 1000.0 - perf_counter ( )