If you have problems with your PC locking or going to sleep, Caffeine will keep it awake. It works by simulating a key press once every 59 seconds, so your machine thinks you're still working at the keyboard, so won't lock the screen or activate the screensaver.
Caffeine latest release -- currently v1.97 (changelog from v1.50 here) -- can be downloaded from https://zhornsoftware.co.uk/caffeine/caffeine.zip.