Basic game engine: timer, FPS and logic loop
The whole tick tock mechanism is not needed for your main loop.

You've set up this elaborate contraption (it took me a while to understand) which measures how long your last "frame" took. Then, when deciding on how long you'll need to wait to get to the next frame, you retrieve that time, and subtract that from the current time plus how long you want to wait.

All this is a very elaborate mechanism for this:

long sleep = (long) (GameTimer.ONE_SECOND / desiredFPS);
try {
    while(true){

        // tick and print fps
        long lastTick = System.nanoTime();
        timer.tick();
        System.out.println(timer.getFPS());

        // input, update and draw (abstract methods of my engine class)
        input();
        update();
        draw();

        // sleep
        long wake = lastTick + sleep;
        do {Thread.sleep(0);}
        while (System.nanoTime() &lt; wake);
    }
} catch (InterruptedException e) {
    // oh someone paused the game
}


This rewrite doesn't really help so I'll explain:

What you have made is something that keeps track of ticks. That's okay. But to then use the tick timer in the calculation makes no sense - you already HAVE the time you started the tick - it's when you entered the loop!

Your GameTimer is useful for doing things like showing debug information in graph form, or finding patterns in lagspikes. But for this usecase, just a single long will do.

And first and last are wrongly named. It's not a pointer to the first and last item in the circular buffer, it's a pointer to the first and last frame of the past second. This should be encoded in the variable name.