1
0
forked from ROMEO/nexosim

6 Commits

Author SHA1 Message Date
Serge Barral
1be2f48a00 Revert "Merge pull request #12 from asynchronics/feature/event-sinks"
This reverts commit 7e881afb638ccc0dbcfc7b539fc152dc923d63e1, reversing
changes made to 9d78e4f72a4c6ff459fc386b2f25beae40b94429.
2024-03-06 16:16:55 +01:00
Serge Barral
863f995f1b Small changes and cleanups to prepare the RPC work 2024-02-19 13:20:02 +01:00
Serge Barral
22516fe190 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`.
2023-08-14 15:47:08 +02:00
Serge Barral
b0f7e69039 Implement periodic events 2023-07-28 16:18:10 +02:00
Serge Barral
f458377308 Make it possible to cancel current-time events
This is a pretty large patch that impacts the API.

Until now, it was not possible to cancel events that were scheduled for
the current simulation time slice, making it necessary for the user to
use complex workarounds (see former version of the espresso machine
example).

The new implementation makes this possible but the generation of a key
associated to an event has now a non-negligible cost (basicaly it
creates three references to an Arc). For this reason, the API now
defaults to NOT creating a key, and new methods were added for
situations when the event may need to be cancelled and a key is
necessary.

See the much simplified implementation of the espresso machine example
for a motivating case.
2023-07-21 14:23:20 +02:00
Serge Barral
31520d461a First release candidate for v0.1.0 2023-01-16 23:05:46 +01:00