View Single Post
Old 10th January 2016, 01:19   #748  |  Link
slavanap
Registered User
 
slavanap's Avatar
 
Join Date: May 2011
Location: Moscow, Russia
Posts: 124
Quote:
Originally Posted by r0lZ View Post
Good work! Seems easy to use. I will probably use it instead of the current method using powercfg.exe. But I need two precisions. Can you confirm that the original EXECUTION_STATE is restored when the PC reboots after a crash?
The state restored after child process is terminated. No matter what happened: crash or successful finish. I give the same return code of the child process as return code of blocksleep.exe

Quote:
Originally Posted by r0lZ View Post
Also, if I use blocksleep to launch x264, the PC will never sleep while the process is running. Fine. But when x264 has finished its job, the whole process is not finished yet. The batch file must still mux the elementary streams to MKV, and that can take up to 15 minutes or so. The question is: When the original execution state is restored because the x264 process ends, is it a risk that the PC goes to sleep immediately, or can I assume that the normal delay before going to sleep (due to no user actions) starts over at that time?
Well, I suggest to use blocksleep either for the whole .bat file (run cmd.exe), or use it for every long command. Note, if blocksleep won't be run for about 90 sec (Windows feature), there's a possibility the PC will go sleep. More than that, blocksleep does not change power profile, so if you use "battery save" kind a mode, the x264 performance may be slow.
This blocksleep functionality still has to be tested.
slavanap is offline