Code example for Timer

0
            	 
            	if( (mDragEventStartX < 150) && draggedLotsLeft ){ 
            		Log.d(TAG, "Driving animation started < Left"); 
            		takingACorner =true;	 
            		slidePic = carLeftBitmap; 
            		new Timer().schedule(new TimerTask(){ 
						@Override 
						public void run() { 
		            		takingACorner =false;
						}}, 1000); 
            	} 
            	 
            	mDragEventInProgress = false; 
            	mDragEventStartX = 0; 
            } 
            	 
            	 
            if (event.getAction() == MotionEvent.ACTION_MOVE) { 
                mTouchX = event.getX(); 
                mTouchY = event.getY();