Sir Chris Hoy says he retired at the right time.