Run the following command in a Terminal:
sudo visudo
Scroll down to the line that looks like this:
Defaults env_reset
and change it to this:
Defaults env_reset,timestamp_timeout=30
**** this for 30 minutes! change it to the time you want…