How can I say 'while the trial is running, do this' and 'when the trial is finished, do that'?

Hi,
In my trial I want to show pictures for 60 seconds. I use the screen function (Psychotoolbox-3) to show my images. Then I’d like to say that those images will be displayed for 60 seconds; and while those 60sec are running, ‘do that’; if the 60 seconds are over, ‘do this’. I know it is something related to GetSecs

How can I write it? Any idea? Thank you very much for your answers if any.