public void run()
    {
        int i = 0, j = 0;
        boolean accelerated = true;
        while (true)
        {
            BufferStrategy strategy = frame.getBufferStrategy();
            Graphics2D g = (Graphics2D)strategy.getDrawGraphics();
            
            g.setColor(Color.red);
            g.fillRect(0, 0, DisplayMonitor.screen.width, DisplayMonitor.screen.height);
            if (accelerated)
            {
                if (j == 0)
                {
                    acceleratedImages.get(i).validate(g);
                }
                
                long before = System.nanoTime();
                acceleratedImages.get(i).draw(0, 0, g);
                acceleratedTimes.add(System.nanoTime() - before);
            }
            else
            {
                long before = System.nanoTime();
                g.drawImage(bufferedImages.get(i), 0, 0, null);
                bufferedTimes.add(System.nanoTime() - before);
            }
            
            g.dispose();
            
            j++;
            if (j >= cycles)
            {
                if (accelerated)
                {
                    j = 0;
                    accelerated = false;
                }
                else
                {
                    accelerated = true;
                    j = 0;
                    i++;
                    
                    if (i >= acceleratedImages.size())
                    {
                        exit();
                    }
                }
            }
            
            strategy.show();
            Toolkit.getDefaultToolkit().sync();
        }
    }