A Self-Tuning/Time-Optimal Controller