def get_next_task(self):
        if _debug: TaskManager._debug("get_next_task")

        # get the time
        now = _time()

        task = None
        delta = None

        if self.tasks:
            # look at the first task
            when, nxttask = self.tasks[0]
            if when <= now:
                # pull it off the list and mark that it's no longer scheduled
                heappop(self.tasks)
                task = nxttask
                task.isScheduled = False

                if self.tasks:
                    when, nxttask = self.tasks[0]
                    # peek at the next task, return how long to wait
                    delta = max(when - now, 0.0)
            else:
                delta = when - now

        # return the task to run and how long to wait for the next one
        return (task, delta)
Objectify ACL if ES is used or call item.get_acl() if
dataset/ETHPy150Open JoelBender/bacpypes/py34/bacpypes/task.py/TaskManager.get_next_task--crossover with--dataset/ETHPy150Open ramses-tech/ramses/ramses/acl.py/DatabaseACLMixin.item_acl