using time.h to loop until reaching a user-specified time

hey all....this is a snippet of code which I am going to use to call a function called trace(), which traceroute's to a specified host. what I want to do here is traceroute continuously until a user-specified time.

this code is not returning the right times, and no matter what time I enter in, the program says it is roughly twice what the current time is and the difference is always 1024 seconds.

have I got the types right? there is probably something small I'm missing.