[SOLVED] need help with second counting algorithm

As I wrote in my original post, "The following code won't work, but it could serve as a starting point:"

I don't have any additional code to show. My objective to to stop calling the showSeconds() function after it has displayed digits for 30 seconds.