forked from ROMEO/nexosim
Overload schedule_*event
methods
The `schedule_*event_in` and `schedule_*event_at` pairs of methods are each merged into a single overloaded method accepting either a relative `Duration`or an absolute `MonotonicTime`.
This commit is contained in:
@ -88,7 +88,7 @@ pub struct DelayedMultiplier {
|
||||
impl DelayedMultiplier {
|
||||
pub fn input(&mut self, value: f64, scheduler: &Scheduler<Self>) {
|
||||
scheduler
|
||||
.schedule_event_in(Duration::from_secs(1), Self::send, 2.0 * value)
|
||||
.schedule_event(Duration::from_secs(1), Self::send, 2.0 * value)
|
||||
.unwrap();
|
||||
}
|
||||
async fn send(&mut self, value: f64) {
|
||||
|
Reference in New Issue
Block a user