Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
imp - Timeout now gets cleared instantly
Browse files Browse the repository at this point in the history
---

We've changed the timeout so that it uses spin lock instead of the normal Thread.Sleep() function. This ensures that we clear the timeout as soon as the user presses any key.

---

Type: imp
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Feb 4, 2024
1 parent d6be295 commit 9f77ade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GRILO.Bootloader/Boot/Style/BootStyleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private static void SelectTimeoutHandler(int timeout)
buffer.AddDynamicText(() => style.RenderSelectTimeout(timeout - timeoutElapsed));
BootloaderMain.bootloaderScreen.AddBufferedPart("Timeout", buffer);
ScreenTools.Render();
Thread.Sleep(1000);
SpinWait.SpinUntil(() => !BootloaderState.WaitingForFirstBootKey, 1000);
BootloaderMain.bootloaderScreen.RemoveBufferedPart("Timeout");
timeoutElapsed += 1;
}
Expand Down

0 comments on commit 9f77ade

Please sign in to comment.