The problem in which contraction of entire muscle takes place and it lasts for just a few second to several hours is :

Tetany

Tetanus

Muscle fatigue

Cramp