mirror of
https://github.com/nushell/nushell.git
synced 2025-06-20 01:48:09 +02:00
Add feature check to std::time::Instant for wasm in jobs
This commit is contained in:
parent
37b69b8c4c
commit
107fef44c4
@ -4,9 +4,11 @@ use std::{
|
|||||||
mpsc::{Receiver, RecvTimeoutError, Sender},
|
mpsc::{Receiver, RecvTimeoutError, Sender},
|
||||||
Arc, Mutex,
|
Arc, Mutex,
|
||||||
},
|
},
|
||||||
time::{Duration, Instant},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(not(target_family = "wasm"))]
|
||||||
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
use nu_system::{kill_by_pid, UnfreezeHandle};
|
use nu_system::{kill_by_pid, UnfreezeHandle};
|
||||||
|
|
||||||
use crate::{Signals, Value};
|
use crate::{Signals, Value};
|
||||||
@ -256,6 +258,7 @@ impl Mailbox {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_family = "wasm"))]
|
||||||
pub fn recv_timeout(
|
pub fn recv_timeout(
|
||||||
&mut self,
|
&mut self,
|
||||||
filter_tag: Option<Tag>,
|
filter_tag: Option<Tag>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user