A ticking clock in stories is a structural device that imposes a time limit during which a problem has to be solved.
Failure to do so in the allotted time renders the story goal unachievable and the mission a failure.
The ticking clock in films
Examples abound: In Kubrick’s Dr Strangelove, the pilots flying the aircraft carrying an atomic bomb that will start the next world war have to be persuaded not to drop it.
In Next, Nicholas Cage has to foil the villain’s plans before a nuclear device wipes out LA.
In my own novel, Scarab II: Reawakening, the Hero, Jack Wheeler, has to get to the quantum computer before the appointed time to stop it from running the programme that may destroy the world.
36 Hours has a ticking clock that is even more tightly woven into the story’s structure. The invasion of Europe is but days away. The Nazis have little time to extract the date and landing site of the Allied forces from James Garner. The story might still work by concentrating on how Garner is seduced into talking. The ticking clock, however, imbues the story with a tension that could not be otherwise achieved.
The ticking clock in stories is often, quite literally, a clock counting down to zero before the bomb explodes.
In Armageddon, a shaft has to be drilled and a bomb placed deep into the comet that is headed for earth.
In The Bridge on the River Kwai, the bridge must be built under the most trying circumstances and finished by a specific date. The explosion must occur in time to send both bridge and train crashing into the river. The tension is almost unbearable.
Summary
A ticking clock defines a specific time for the main story goal to be achieved to avoid calamity. The device increases tension and helps to maintain the forward thrust of the story.