def METHOD_NAME(self):
    relative_time = time.time() - self.global_start
    next_job = min(self.jobs, key=lambda j: j.next_run)
    delta = next_job.next_run - relative_time
    if delta <= 0.1:
        # careful not to give 0 or negative values to the select timeout, which has unclear interpretation
        logger.warning(f'Scheduler next run of {next_job.name} is {-delta} seconds in the past')
        return 0.1
    elif delta > 20.0:
        logger.warning(f'Scheduler next run unexpectedly over 20 seconds in future: {delta}')
        return 20.0
    logger.debug(f'Scheduler next run is {next_job.name} in {delta} seconds')
    return delta