It's a tradeoff between what they're doing and how cold or warm it is.
Maximum time seems to be on the order of an hour or two.
When the temperature is fairly low and they're relatively inactive, they can remain beneath the surface for a prolonged period. I don't know of anybody who's really looked in detail at their diving physiology. But the general pattern of all organisms that have this capacity to hold their breath a long time is two-fold. One is they shunt blood away from non-vital tissue, and the anatomy of crocodiles suggests that they can do this. If you took the heart, lungs, and major veins and arteries of a crocodile, hung them up and asked ten physiologists what it was, most of them would say it was a mammal.