Hello all. I've been recently working a bunch on my game, and I've seen a lot of simple game examples calculate Ticks/Frames per seconds in some odd way that uses a lot of variables. And I have a small piece of code in my game that calculates how many ticks passed every second. It seems really easy and I was wondering why no-one else used the method. Here is mine:

//...
int ticks = 0;
 
Thread tickThread = new Thread(new Runnable(){
  public void run(){
    while(true){
      try{
        Thread.sleep(1000);
      }catch(Exception e){}
      //Then show user ticks that have
     //passed.
    }
  }
});
public Renderer(){
  tickThread.start();
}
 
//... inside update method
public void update(){
  ticks++;
}

It pretty much uses a thread sleeping for 1000 milliseconds, then shows the user the amount of ticks that have passed. update() is called every game loop.
So, is there an easier way? I've never seen anyone use this method. In LWJGL it is very accurate.