Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript clock

//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);
};
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #javascript #clock
ADD COMMENT
Topic
Name
1+9 =