public void alarm ()
	{	long now=System.currentTimeMillis();
		if (B.maincolor()>0) BlackRun=(int)((now-CurrentTime)/1000);
		else WhiteRun=(int)((now-CurrentTime)/1000);
		if (Col>0 && BlackTime-BlackRun<0)
		{	if (BlackMoves<0)
			{	BlackMoves=ExtraMoves;
				BlackTime=ExtraTime; BlackRun=0;
				CurrentTime=now;
			}
			else if (BlackMoves>0)
			{	new Message(this,Global.resourceString("Black_looses_by_time_"));
				Timer.stopit();
			}
			else
			{	BlackMoves=ExtraMoves;
				BlackTime=ExtraTime; BlackRun=0;
				CurrentTime=now;
			}
		}
		else if (Col<0 && WhiteTime-WhiteRun<0)
		{	if (WhiteMoves<0)
			{	WhiteMoves=ExtraMoves;
				WhiteTime=ExtraTime; WhiteRun=0;
				CurrentTime=now;
			}
			else if (WhiteMoves>0)
			{	new Message(this,Global.resourceString("White_looses_by_time_"));
				Timer.stopit();
			}
			else
			{	WhiteMoves=ExtraMoves;
				WhiteTime=ExtraTime; WhiteRun=0;
				CurrentTime=now;
			}
		}
		settitle();
	}