Code example for Timer

0
            	 
				if( (mDragEventStartX > 150) && draggedLotsRight ){ 
            		takingACorner =true; 
            		currentDirection = DRIVING_RIGHT; 
            		Log.d(TAG, "Driving animation started Right >"); 
            		new Timer().schedule(new TimerTask(){ 
						@Override 
						public void run() { 
							takingACorner =false; 
		            		picIdx =0; 
						}}, 1000); 
            	} 
            	 
            	if( (mDragEventStartX < 150) && draggedLotsLeft ){ 
            		takingACorner =true; 
            		currentDirection = DRIVING_LEFT; 
            		Log.d(TAG, "Driving animation started < Left"); 
            		new Timer().schedule(new TimerTask(){ 
						@Override 
						public void run() { 
		            		takingACorner =false;