Req help on writing shell script

My script needs user input within time period of 1 min or may be with within 30 sec.

Flow diagram:
if (user provides input within 1 min) then
script runs on the basis of user input
else
script runs on the basis of default input(hard coded in the script)
.Any help in this script is appreciated.

This question (and especially the timing) looks suspiciously similar to this one. Are you colleagues?