The TPS is just a variable resistor (potentiometer). It does two basic things, one is to tell the ECU that the throttle is closed (at idle) and off-idle, how far open the throttle plate is. It must be adjusted right to detect the idle position. If not adjusted right, the engine will not idle properly and you can't really set the timing properly.