"How long would it take a hostile operative to gain control of all the key computer systems?"
If you've got a hostile operative onboard on in-service navy ship then the whole ship is compromised and effectively dead in the water. The chances of this happening - one hopes due to security at the dock and personnel vetting - are insignificant. A far more likely attack vector is The Idiot. The Idiot will pull out a vital cable accidentaly, plug in his usb stick containing a load of ripped mp3s from a pirate site, give the wrong information at just the wrong time etc...
This IMO is rather more likely.