Compute wait time.

        :param duration: Total time (in seconds).
        :param steps: Number of steps.
        :param commands: Number of commands.
        :returns: Wait in seconds.

def _wait(self, duration, steps, commands):
        """ Compute wait time.

        :param duration: Total time (in seconds).
        :param steps: Number of steps.
        :param commands: Number of commands.
        :returns: Wait in seconds.
        """
        wait = ((duration - self.wait * self.reps * commands) / steps) - \
               (self.wait * self.reps * self._bridge.active)
        return max(0, wait)