pub struct TimeoutConfig {
ticks_per_ms: u64,
}Expand description
Timeout configuration derived from TSC frequency.
Fields§
§ticks_per_ms: u64TSC ticks per millisecond
Implementations§
Source§impl TimeoutConfig
impl TimeoutConfig
Sourcepub fn tcp_connect(&self) -> u64
pub fn tcp_connect(&self) -> u64
TCP connect timeout (30 seconds)
Sourcepub fn http_receive(&self) -> u64
pub fn http_receive(&self) -> u64
HTTP receive timeout (60 seconds for slow connections)
Sourcepub fn loop_warning(&self) -> u64
pub fn loop_warning(&self) -> u64
Main loop iteration warning threshold (5ms)
Sourcepub fn device_reset(&self) -> u64
pub fn device_reset(&self) -> u64
Device reset timeout (100ms)
Sourcepub fn ms_to_ticks(&self, ms: u64) -> u64
pub fn ms_to_ticks(&self, ms: u64) -> u64
Convert milliseconds to ticks
Sourcepub fn ticks_to_ms(&self, ticks: u64) -> u64
pub fn ticks_to_ms(&self, ticks: u64) -> u64
Convert ticks to milliseconds
Trait Implementations§
Source§impl Clone for TimeoutConfig
impl Clone for TimeoutConfig
Source§fn clone(&self) -> TimeoutConfig
fn clone(&self) -> TimeoutConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimeoutConfig
impl Debug for TimeoutConfig
impl Copy for TimeoutConfig
Auto Trait Implementations§
impl Freeze for TimeoutConfig
impl RefUnwindSafe for TimeoutConfig
impl Send for TimeoutConfig
impl Sync for TimeoutConfig
impl Unpin for TimeoutConfig
impl UnwindSafe for TimeoutConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more