PID with Timing and Stopping Criterion