A data collection trigger based on the maximum number and refresh time.
scenes to be used:
see tests
```rust
extern crate lazystatic; use buffertrigger::{BufferTrigger, SimpleBufferTrigger, SimpleBufferTriggerBuilder}; use log::LevelFilter; use std::{thread, time::Duration};
lazystatic! {
static ref BUFFERTRIGGER: SimpleBufferTrigger
fn itworks() { let _ = envlogger::builder() .istest(true) .filterlevel(LevelFilter::Debug) .try_init();
thread::spawn(|| {
BUFFER_TRIGGER.listen_clock_trigger();
});
BUFFER_TRIGGER.push(1);
BUFFER_TRIGGER.push(2);
BUFFER_TRIGGER.push(3);
BUFFER_TRIGGER.push(4);
BUFFER_TRIGGER.push(5);
thread::sleep(Duration::from_secs(5));
} ```
output:
text
[1, 2, 3]
[4, 5]
This project is still under development. The following features with the check marks are supported.
If you are concerned about an unimplemented feature, please tell me and I will finish writing it ASAP.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions