1 2 3 4 5 6 7 8 9 10 11
//! One cooperative deadline shared by preparation and domain operations. use crate::core::error::{AppError, Result}; use std::time::Instant; pub fn check(deadline: Instant) -> Result<()> { if Instant::now() >= deadline { Err(AppError::new("DEADLINE", "Operation deadline exceeded.", 3)) } else { Ok(()) } }