If you put your dog in timeout for something they shouldn't be doing then 3 minutes is a good amount of time to put your dog in timeout.
Or you can stop the timeout when the dog has been calm. So if the dog becomes calm sooner than 3 minutes then you can let them out of timeout.