You can define a pass-in field (call it SurveyTime) as a whole number.
At the end of the survey, you can pop this script into the footer ...
Note: PageTime(StartPage, EndPage) returns a value (in seconds) between StartPage and EndPage.
In the above example, I have assumed your survey starts at page 1 and ends at page 50. Change your EndPage accordingly. To determine your page numbers, go to the Write Questionnaire and click on any question. At the bottom of the screen, the page numbering will be displayed.
Now you have a variable called SurveyTime which has captured the interview length.
Pass the SurveyTime variable within your termination link as you would any variable like an ID.
Just one further tip - go to the Sawtooth Software HELP and look up the PageTime function. It tells you some handy information about the behaviour of this function.