def set_timer(self, timer="wall"):
        """Set the timer function

        Parameters
        ----------
        timer : {'wall', 'cpu', or callable}
                Timer function used to measure task running times.
                'wall' uses `time.time`, 'cpu' uses `time.process_time`

        Returns
        -------
        self
        """
        if timer == "wall":
            timer = time.time
        elif timer == "cpu":
            try:
                timer = time.process_time
            except AttributeError:
                raise RuntimeError(
                    "Python2.7 on Windows does not offer a CPU time function. "
                    "Please upgrade to Python >= 3.5.")
        self.timer = timer
        return self