resolve_timeout

Function resolve_timeout 

Source
pub const fn resolve_timeout(user_timeout: Option<u64>) -> u64
Expand description

Resolve timeout with deterministic bounds (never returns 0 or unbounded) This pattern ensures execution always has a bounded duration.

§Arguments

  • user_timeout - Optional user-specified timeout in seconds

§Returns

A bounded timeout value that is:

  • DEFAULT_TIMEOUT_SECS if None or 0
  • MAX_TIMEOUT_SECS if exceeds maximum
  • The user value if within bounds