rx_core_observable_timer

Crates.iorx_core_observable_timer
lib.rsrx_core_observable_timer
version0.2.0
created_at2026-01-19 11:09:26.739631+00
updated_at2026-01-24 15:03:45.661845+00
descriptiontimer observable for rx_core
homepagehttps://github.com/AlexAegis/rx_bevy
repositoryhttps://github.com/AlexAegis/rx_bevy
max_upload_size
id2054296
size14,791
Sandor (AlexAegis)

documentation

https://github.com/AlexAegis/rx_bevy

README

observable_timer

crates.io ci codecov license

Emits once after the timer elapses.

See Also

Example

Run the example with:

cargo run -p rx_core --example observable_timer_example
let mut mock_executor = MockExecutor::new_with_logging();
let scheduler = mock_executor.get_scheduler_handle();

let mut timer = TimerObservable::new(Duration::from_secs(1), scheduler);
let _subscription = timer.subscribe(PrintObserver::new("timer_observable"));

mock_executor.tick(Duration::from_millis(600));
mock_executor.tick(Duration::from_millis(400));

Output:

Ticking... (600ms)
Ticking... (400ms)
timer_observable - next: ()
timer_observable - completed
timer_observable - unsubscribed
Commit count: 652

cargo fmt