#[derive(Debug, Clone)]
pub struct EngineLease {
pub lease_id: String,
pub client_id: String,
pub client_type: String,
pub acquired_at_ms: u64,
pub last_renewed_at_ms: u64,
pub ttl_ms: u64,
}
impl EngineLease {
pub fn is_expired(&self, now_ms: u64) -> bool {
now_ms.saturating_sub(self.last_renewed_at_ms) > self.ttl_ms
}
}