public MainLoop(LoopSteps loopSteps,
            int ups,
            int maxFrameSkips,
            int noDelaysPerYield)
    {
        super();

        if (ups < 1)
            throw new IllegalArgumentException("You must display at least one frame per second!");

        if (ups > 1000)
            ups = 1000;

        this.game = loopSteps;
        this.desiredUpdateTime = 1000000000L / ups;
        this.running = true;

        this.maxFrameSkips = maxFrameSkips;
        this.noDelaysPerYield = noDelaysPerYield;
    }