idle problems

i have a 2000 celica gts. when ive been driving a little bit till the car warms up and the temp guage reaches the middle the the middle the idle randomly shoots up to 1700rpms. also when the idle is low befor it gets warm and i tap the gas quick i hear what sounds like metal tapping. around 10 really quick taps in a row till i reach 1000rpms. my mechanic said the tapping metal sounds like timing but i wanted to know what you guys thought. it doesnt feel like the engine is slipping or anything when it happens. thankyou for your time you guys