Skip to main content

duration_to_qos_ms

Function duration_to_qos_ms 

Source
pub fn duration_to_qos_ms(d: Duration) -> Result<u32, TransportError>
Expand description

Phase-301 (issue 0241) — lower a core::time::Duration into a u32 millisecond QoS field. Boundary contract:

  • zero stays 0 (unset / no-check);
  • sub-millisecond remainders CEIL to the next ms (rounding down would silently turn a real deadline into “no deadline”);
  • values at or past DURATION_INFINITE_MS ms are a create-time error, never a clamp (infinite is requested via the sentinel or 0, not by a huge finite duration).