def threshold(self):
        """Get maximum test time allowed when --timer-fail option is used."""
        if self._threshold is None:
            self._threshold = {
                'error': self.timer_warning,
                'warning': self.timer_ok,
            }[self.timer_fail]
        return self._threshold