feat: avoid using spin sleep unless focused

This commit is contained in:
2025-08-13 21:36:06 -05:00
parent d80d7061e7
commit 12a63374a8
5 changed files with 22 additions and 18 deletions

View File

@@ -11,7 +11,7 @@ pub mod emscripten;
/// Platform abstraction trait that defines cross-platform functionality.
pub trait Platform {
/// Sleep for the specified duration using platform-appropriate method.
fn sleep(&self, duration: Duration);
fn sleep(&self, duration: Duration, focused: bool);
/// Get the current time in seconds since some reference point.
/// This is available for future use in timing and performance monitoring.