I don't see why not, but I would still rephrase the sentence. I don't cook pasta for a specific number of minutes ; I play it by ear. I cook pasta like this, too!
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.