//you can use Timer to do yours clock
Timer timer=new Timer();
TimerTask task=new TimerTask(){
int h=0;
int s=0;
public void run(){
s++;
if(s==60){
h++;
s=0;
if(h==25){
h=0;
}
}
}
};
timer.schedule(task,0, 1000);
timer.schedule(task, 1000);
};