Add feature check to std::time::Instant for wasm in jobs

This commit is contained in:
cosineblast 2025-03-22 21:48:27 -03:00
parent 37b69b8c4c
commit 107fef44c4

View File

@ -4,9 +4,11 @@ use std::{
mpsc::{Receiver, RecvTimeoutError, Sender},
Arc, Mutex,
},
time::{Duration, Instant},
};
#[cfg(not(target_family = "wasm"))]
use std::time::{Duration, Instant};
use nu_system::{kill_by_pid, UnfreezeHandle};
use crate::{Signals, Value};
@ -256,6 +258,7 @@ impl Mailbox {
}
}
#[cfg(not(target_family = "wasm"))]
pub fn recv_timeout(
&mut self,
filter_tag: Option<Tag>,