I create a project in java which is a typing game. I use java.util.Timer.schedule
to set a Timer to repaint my window. Code here:
timer.schedule(new TimerTask() {
@Override
public void run() {
// Some other codes ...
repaint();
}
}, 0, 1000 / HZ);
HZ is 200, the code work well on Ubuntu but when I run it on Windows, it's slowly obviously than on Ubuntu, I am confused about that.