If you are out on a jetty and a hugh wave knocks you into the water. How much time do you have before you succumb to hypotherima?

I have been told that if the tide at the jetty is taking you out to sea you should swim parallel to the shore line. That gets you out of the rips and makes it possilbe to save yourself.