Deepstar Six

DeepStar Six is an experimental deep sea US Naval facility, crewed by a mix of military and civilians, now in the final week of their tour. The project is headed by Dr. Van Gelder, in order to test underwater colonization methods, while overseeing the installation of a new nuclear missile storage platform. Already nearing his deadline, Van Gelder's plans are threatened when geologist Burciaga (Elya Baskin) discovers a massive cavern system under the site. Van Gelder orders the use of depth charges to collapse the cavern, to the dismay of Dr. Scarpelli (Nia Peeples), who want to study the potentially primordial ecosystem inside.
The ensuing detonation collapses part of the seabed, forming a massive fissure in the ocean floor. Submarine pilots Osborne and Hodges (Ronn Carroll, Thom Bray) send an unmanned probe to explore, but lose contact and venture in after it. Upon finding the probe, they detect a large sonar contact moments before being attacked and killed by an unseen force. The aggressor then attacks the observation pod, leaving Joyce Collins (Nancy Everhard) and a dying Burciaga trapped inside as it teeters on the edge of the ravine. Captain Laidlaw (Taurean Blacque) and submarine pilot McBride (Greg Evigan)- who is also Collins' paramour -attempt a rescue. They dock with the pod and rescue Collins, but the unstable hatch door closes on Laidlaw. Mortally wounded, he floods the compartment, forcing McBride and Collins to return and leave without him.
The remaining crew now prepare to abandon the base, but the missile platform must first be secured. Without Laidlaw, facility technician Snyder (Miguel Ferrer) is forced to interpret the unfamiliar protocol. When prompted by the computer to explain the reason, Snyder reports "aggression" (due to the creature), which the computer interprets as an enemy military force and advises to detonate the missile warheads. He complies and the resulting explosion creates a shockwave that damages DeepStar Six and the cooling system for the bases' nuclear reactor. With failed life support, they begin repairs to restore power and pressure for the decompression procedure.
Engineer Jim Richardson (Matt McCoy) ventures outside in a JIM suit to affect repairs, but the creature comes after him, leading Scarpelli to conclude it's attracted to light. The crew retrieves his suit and haul him through the airlock, but the creature forces its way inside and bites him in half. The team retreats as the creature consumes the panic-stricken Scarpelli. Arming themselves with shotguns and harpoons with explosive carbon-dioxide cartridges, they venture back in to finish repairs. They succeed, but the creature attacks and Van Gelder dies when he accidentally backs into Snyder's harpoon, before they escape to the medlab. Already badly stressed, Snyder quickly begins to unravel with guilt and fear. After a hallucination of Van Gelder, Snyder jumps into the escape pod and launches. Because he has not undergone decompression, the pressure changes from the ascent cause him to burst.
McBride swims through the flooded base to the mini-sub, to use it as their means of escape. While he's gone, the creature bursts into the medlab and Dr. Norris (Cindy Pickett) attacks it with an overcharged defibrillator. Norris electrocutes herself and the creature as it attacks her, allowing Collins and McBride to escape- fleeing before the reactor goes critical. The sub breaches the surface, where they deploy a raft, only for the creature to emerge. McBride discharges the sub's fuel, then fires a flare- killing creature as the sub explodes. McBride soon resurfaces and joins Collins, as they wait for a Navy rescue team to arrive.

Question: How long before they were attacked did they feel the sonar contact?
Answer: Moments before.