I think you will find, your computer is not turning off, but going into sleep or hibernation mode.
But to get a more specific answer, we need to know what operating system you are using, and an overview of your computers specification.
Best phone camera 2017
Stunning new film posters by Hattie Stewart, Joe Cruz & more
iPad Pro 10.5in (2017) review
28 astuces pour profiter au mieux de votre iPhone