-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Summary
Add sleep/delay capability to naml runtime for timing control in games and applications.
Proposed API
// Sleep for specified milliseconds
fn sleep(ms: int);
Use Cases
- Game loops (controlling frame rate)
- Rate limiting
- Animations
- Polling intervals
Implementation Notes
- Block execution for specified duration
- Platform considerations:
- Native:
std::thread::sleep - Server WASM: WASI poll_oneoff or busy wait
- Browser: Not directly applicable (use async/setTimeout)
- Native:
Acceptance Criteria
-
sleep(ms)pauses execution for approximately ms milliseconds - Accepts values from 0 to at least 60000 (1 minute)
- Works on native platform
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels