I would disconnect power from the dryer, remove the front panel and clean out any lint build up that maybe in, on or around the motor.
Then try it again. The motor could be cutting out on the thermo fuse that will rest after it cools down again.
If it still does it after cleaning out the lint then check the motor to see if it gets hot.
Once it cuts out disconnect power from the dryer and put your hand on the motor to see how it feels. It maybe warm, but should not be hot at all. You should be able to hold your hand on it.
If the motor does not run hot I would go ahead and replace the timer.
If you have a volt/ohm meter to use you can check the thermo cut-out on the motor when it quits to see if that is what the problem is.