-
Notifications
You must be signed in to change notification settings - Fork 19
feat: add run_until_blocked_or_time to pure-stage #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
also return next wakeup in Blocked::Sleeping and add Running::next_wakeup() accessor Signed-off-by: Roland Kuhn <[email protected]>
WalkthroughThe simulation’s time management got a slick upgrade: now you can skip the clock to a specified max time, not just the next wakeup. The Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test
participant Sim as SimulationRunning
participant Blocked as Blocked
Test->>Sim: skip_to_next_wakeup(Some(time))
Sim->>Sim: Advance clock to min(next_wakeup, time)
Sim-->>Test: Return true if wakeup occurred, else false
Test->>Sim: skip_to_next_wakeup(None)
Sim->>Sim: Advance clock to next_wakeup
Sim-->>Test: Return result
Sim->>Sim: next_wakeup()
Sim-->>Test: Return Option<Instant>
Sim->>Sim: run_until_blocked_or_time(time)
Sim->>Sim: Loop until blocked or time reached
Sim->>Blocked: block_reason()
Blocked-->>Sim: Return Sleeping { next_wakeup } or Idle
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (9)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
... and 8 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Co-authored-by: Stevan A <[email protected]> Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
8cc2f45 to
5d13537
Compare
also return next wakeup in
Blocked::Sleepingand addRunning::next_wakeup()accessorSigned-off-by: Roland Kuhn [email protected]
Summary by CodeRabbit