mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-04-03 21:40:44 +02:00
13e woo
This commit is contained in:
parent
5d627f7669
commit
eb899906f9
8 changed files with 627 additions and 728 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use crate::{*, time::*, lang::*};
|
||||
use ::std::{thread::JoinHandle, time::Duration};
|
||||
#[cfg(feature = "tui")] use ::crossterm::event::poll;
|
||||
#[cfg(feature = "term")] use ::crossterm::event::poll;
|
||||
|
||||
#[derive(Clone)] pub struct Exit(Arc<AtomicBool>);
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ impl Thread {
|
|||
|
||||
/// Spawn a thread that uses [crossterm::event::poll]
|
||||
/// to run `call` every `time` msec.
|
||||
#[cfg(feature = "tui")]pub fn new_poll <F> (
|
||||
#[cfg(feature = "term")]pub fn new_poll <F> (
|
||||
exit: Arc<AtomicBool>, time: Duration, call: F
|
||||
) -> Result<Self, std::io::Error>
|
||||
where F: Fn(&PerfModel)->() + Send + Sync + 'static
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue