zagens-cli 0.8.1

Zagens headless CLI + HTTP/SSE runtime sidecar (`zagens`, `zagens-runtime` binaries)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Panel poll intervals (align desktop `runtimePoll.ts`).

use std::time::Duration;

/// Checklist / harness poll while a turn is streaming.
pub const POLL_STREAMING_MS: u64 = 2000;

/// Idle poll interval.
pub const POLL_IDLE_MS: u64 = 5000;

#[must_use]
pub fn poll_interval(streaming: bool) -> Duration {
    Duration::from_millis(if streaming {
        POLL_STREAMING_MS
    } else {
        POLL_IDLE_MS
    })
}