Skip to content

Commit 94caf12

Browse files
committed
chore(main): add constant for delay on error
1 parent b9b3439 commit 94caf12

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#![feature(uefi_std)]
33
extern crate core;
44

5+
/// The delay to wait for when an error occurs in Sprout.
6+
const DELAY_ON_ERROR: Duration = Duration::from_secs(10);
7+
58
use crate::config::RootConfiguration;
69
use crate::context::{RootContext, SproutContext};
710
use crate::entries::BootableEntry;
@@ -318,8 +321,8 @@ fn main() -> Result<()> {
318321
for (index, stack) in error.chain().enumerate() {
319322
error!("[{}]: {}", index, stack);
320323
}
321-
// Sleep for 10 seconds to allow the user to read the error.
322-
uefi::boot::stall(Duration::from_secs(10));
324+
// Sleep to allow the user to read the error.
325+
uefi::boot::stall(DELAY_ON_ERROR);
323326
}
324327

325328
// Sprout doesn't necessarily guarantee anything was booted.

0 commit comments

Comments
 (0)