During the Spring and Autumn Period (770-476 BC), the State of Qi prepared itself for battle with the State of Lu. Qi drummers goaded the Lu army to fight. As the Lu ruler was about to give the order to attack, his counselor Cao Gui stopped him and said: "We should wait until the third drum roll, sire." The Lu ruler was perplexed by this advice, but decided to heed it. On the third drum roll, the Lu army launched their attack and won. After the battle, the Lu ruler asked Cao Gui the reason for his odd piece of advice. Cao Gui answered: "Fighting requires spirit, sire. The Qi soldiers' spirits were roused by the first drum roll, but were depleted by the second. And, by the third, they were completely exhausted. We attacked when their spirits were exhausted. That's why we won."
This idiom now describes a situation where something is done in one go, in one sustained and concentrated effort.