Apple - How to delay locking of my Mac when I am not using it

In Lion, there's a setting in System Preferences under Security & Privacy asking how long after sleep or the screen saver begins is the password required.

enter image description here

If anyone gets this problem you wont solve it with the above. You will need to go to system preferences and then energy saving and then set the time-out for battery and plug-in use. Spotlight (Cmd + Space) and enter Energy Saving. Once you're in you'll find it :)

In macOS Sierra,

Click on apple icon Left top corner -> System Preferences..

Click on Security & Privacy Icon

Click on General tab.

Now you can increase or decrease locking time. enter image description here enter image description here