I think it's as long as you can do 40 without stopping, i.e. getting out of pushup position. In the army there was also a two minute time limit. In practice I don't think this mattered much, as I didn't find it very helpful to rest in a proper push-up position. I suppose some do.
I love to swim too―especially in the ocean =)
I'd like to live at the see when I will retire... No idea if I 'll have the money
However...I'm not very fast, lol.