Can any body suggest me a function which I can use in QTP for following scenario...

As sometimes page navigation take times due to which our script shows an error. For that we use the `wait(time)` function, but it is a fixed time for which the QTP control waits. I want to use a function (I have heard about the sync function, but don't know how to use it) so that QTP waits only for the time, time taken in navigation (not more/less then it).