This commit is contained in:
same mf who else 2026-03-21 17:35:31 +02:00
parent 5d627f7669
commit eb899906f9
8 changed files with 627 additions and 728 deletions

View file

@ -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