def _setup_cgroup_time_limit(self, hardtimelimit, softtimelimit, walltimelimit,
                                 cgroups, cores, pid_to_kill):
        """Start time-limit handler.
        @return None or the time-limit handler for calling cancel()
        """
        # hard time limit with cgroups is optional (additionally enforce by ulimit)
        cgroup_hardtimelimit = hardtimelimit if cgroups in CPUACCT else None

        if any([cgroup_hardtimelimit, softtimelimit, walltimelimit]):
            # Start a timer to periodically check timelimit
            timelimitThread = _TimelimitThread(cgroups=cgroups,
                                               hardtimelimit=cgroup_hardtimelimit,
                                               softtimelimit=softtimelimit,
                                               walltimelimit=walltimelimit,
                                               pid_to_kill=pid_to_kill,
                                               cores=cores,
                                               callbackFn=self._set_termination_reason,
                                               kill_process_fn=self._kill_process)
            timelimitThread.start()
            return timelimitThread
        return None
dataset/ETHPy150Open sosy-lab/benchexec/benchexec/runexecutor.py/RunExecutor._setup_cgroup_time_limit/swapped operands of `in`