mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-10 20:45:38 +02:00
speedup PW startup restore by setting set process priority to high during the first 10 seconds of PW starting
This commit is contained in:
parent
e8f06c1368
commit
4df563f1bb
1 changed files with 9 additions and 0 deletions
|
@ -48,6 +48,15 @@ if not errorlevel 1 goto wait_to_finish";
|
|||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var process = Process.GetCurrentProcess();
|
||||
var process_priority = process.PriorityClass;
|
||||
process.PriorityClass = ProcessPriorityClass.High;
|
||||
var timer = new System.Threading.Timer(state =>
|
||||
{
|
||||
process.PriorityClass = process_priority;
|
||||
});
|
||||
timer.Change(10000, System.Threading.Timeout.Infinite);
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue