Home
last modified time | relevance | path

Searched refs:Duration (Results 1 – 24 of 24) sorted by relevance

/smoltcp-0.9.1/src/
Dtime.rs127 ::std::time::UNIX_EPOCH + ::std::time::Duration::from_micros(val.micros as u64) in from()
137 impl ops::Add<Duration> for Instant {
140 fn add(self, rhs: Duration) -> Instant { in add()
145 impl ops::AddAssign<Duration> for Instant {
146 fn add_assign(&mut self, rhs: Duration) { in add_assign() argument
151 impl ops::Sub<Duration> for Instant {
154 fn sub(self, rhs: Duration) -> Instant { in sub()
159 impl ops::SubAssign<Duration> for Instant {
160 fn sub_assign(&mut self, rhs: Duration) { in sub_assign() argument
166 type Output = Duration;
[all …]
/smoltcp-0.9.1/src/wire/
Dndisc.rs5 use crate::time::Duration;
50 pub fn router_lifetime(&self) -> Duration { in router_lifetime() argument
52 Duration::from_secs(NetworkEndian::read_u16(&data[field::ROUTER_LT]) as u64) in router_lifetime()
57 pub fn reachable_time(&self) -> Duration { in reachable_time() argument
59 Duration::from_millis(NetworkEndian::read_u32(&data[field::REACHABLE_TM]) as u64) in reachable_time()
64 pub fn retrans_time(&self) -> Duration { in retrans_time() argument
66 Duration::from_millis(NetworkEndian::read_u32(&data[field::RETRANS_TM]) as u64) in retrans_time()
131 pub fn set_router_lifetime(&mut self, value: Duration) { in set_router_lifetime() argument
138 pub fn set_reachable_time(&mut self, value: Duration) { in set_reachable_time() argument
145 pub fn set_retrans_time(&mut self, value: Duration) { in set_retrans_time() argument
[all …]
Dndiscoption.rs6 use crate::time::Duration;
253 pub fn valid_lifetime(&self) -> Duration { in valid_lifetime() argument
255 Duration::from_secs(NetworkEndian::read_u32(&data[field::VALID_LT]) as u64) in valid_lifetime()
260 pub fn preferred_lifetime(&self) -> Duration { in preferred_lifetime() argument
262 Duration::from_secs(NetworkEndian::read_u32(&data[field::PREF_LT]) as u64) in preferred_lifetime()
336 pub fn set_valid_lifetime(&mut self, time: Duration) { in set_valid_lifetime() argument
343 pub fn set_preferred_lifetime(&mut self, time: Duration) { in set_preferred_lifetime() argument
400 pub valid_lifetime: Duration,
401 pub preferred_lifetime: Duration,
636 use crate::time::Duration;
[all …]
Digmp.rs5 use crate::time::Duration;
178 max_resp_time: Duration,
295 fn max_resp_code_to_duration(value: u8) -> Duration { in max_resp_code_to_duration() argument
304 Duration::from_millis(decisecs * 100) in max_resp_code_to_duration()
307 const fn duration_to_max_resp_code(duration: Duration) -> u8 { in duration_to_max_resp_code()
441 let time = duration_to_max_resp_code(Duration::from_millis(duration * 100)); in duration_to_max_resp_time_max()
/smoltcp-0.9.1/examples/
Dloopback.rs15 use smoltcp::time::{Duration, Instant};
21 use smoltcp::time::{Duration, Instant};
32 pub fn advance(&self, duration: Duration) { in advance() argument
44 use smoltcp::time::{Duration, Instant};
58 pub fn advance(&self, duration: Duration) { in advance() argument
165 Some(Duration::ZERO) => debug!("resuming"), in main()
170 None => clock.advance(Duration::from_millis(1)), in main()
Dping.rs20 time::{Duration, Instant},
98 .map(|s| Duration::from_secs(u64::from_str(&s).unwrap())) in main()
99 .unwrap_or_else(|| Duration::from_secs(1)); in main()
100 let timeout = Duration::from_secs( in main()
Ddhcp_client.rs13 time::Duration,
45 dhcp_socket.set_max_lease_duration(Some(Duration::from_secs(10))); in main()
Dserver.rs10 use smoltcp::time::{Duration, Instant};
166 socket.set_keep_alive(Some(Duration::from_millis(1000))); in main()
167 socket.set_timeout(Some(Duration::from_millis(2000))); in main()
Dbenchmark.rs15 use smoltcp::time::{Duration, Instant};
107 let default_timeout = Some(Duration::from_millis(1000)); in main()
Dsixlowpan_benchmark.rs55 use smoltcp::time::{Duration, Instant};
178 let default_timeout = Some(Duration::from_millis(1000)); in main()
Dutils.rs19 use smoltcp::time::{Duration, Instant};
216 device.set_bucket_interval(Duration::from_millis(shaping_interval)); in parse_middleware_options()
/smoltcp-0.9.1/fuzz/fuzz_targets/
Dtcp_headers.rs6 use smoltcp::time::{Duration, Instant};
15 use smoltcp::time::{Duration, Instant};
29 pub fn advance(&self, duration: Duration) { in advance() argument
210 Some(Duration::ZERO) => {}
212 None => clock.advance(Duration::from_millis(1)),
/smoltcp-0.9.1/src/iface/
Dsocket_meta.rs4 time::{Duration, Instant},
46 pub(crate) const DISCOVERY_SILENT_TIME: Duration = Duration::from_millis(1_000);
Dneighbor.rs7 use crate::time::{Duration, Instant};
53 pub(crate) const SILENT_TIME: Duration = Duration::from_millis(1_000);
56 pub(crate) const ENTRY_LIFETIME: Duration = Duration::from_millis(60_000);
Dfragmentation.rs9 use crate::time::{Duration, Instant};
/smoltcp-0.9.1/src/socket/
Ddhcpv4.rs5 use crate::time::{Duration, Instant};
19 const DEFAULT_LEASE_DURATION: Duration = Duration::from_secs(120);
106 pub discover_timeout: Duration,
108 pub initial_request_timeout: Duration,
110 pub min_renew_timeout: Duration,
116 discover_timeout: Duration::from_secs(10), in default()
117 initial_request_timeout: Duration::from_secs(5), in default()
119 min_renew_timeout: Duration::from_secs(60), in default()
145 max_lease_duration: Option<Duration>,
226 pub fn max_lease_duration(&self) -> Option<Duration> { in max_lease_duration() argument
[all …]
Ddns.rs9 use crate::time::{Duration, Instant};
18 const RETRANSMIT_DELAY: Duration = Duration::from_millis(1_000);
19 const MAX_RETRANSMIT_DELAY: Duration = Duration::from_millis(10_000);
20 const RETRANSMIT_TIMEOUT: Duration = Duration::from_millis(10_000); // Should generally be 2-10 secs
87 delay: Duration,
Dtcp.rs14 use crate::time::{Duration, Instant};
130 fn retransmission_timeout(&self) -> Duration { in retransmission_timeout() argument
133 Duration::from_millis(ms as u64) in retransmission_timeout()
211 delay: Duration,
219 const ACK_DELAY_DEFAULT: Duration = Duration::from_millis(10);
220 const CLOSE_DELAY: Duration = Duration::from_millis(10_000);
238 fn should_retransmit(&self, timestamp: Instant) -> Option<Duration> { in should_retransmit() argument
243 Timer::FastRetransmit => Some(Duration::from_millis(0)), in should_retransmit()
269 fn set_for_idle(&mut self, timestamp: Instant, interval: Option<Duration>) { in set_for_idle() argument
283 fn rewind_keep_alive(&mut self, timestamp: Instant, interval: Option<Duration>) { in rewind_keep_alive() argument
[all …]
/smoltcp-0.9.1/src/phy/
Dfault_injector.rs2 use crate::time::{Duration, Instant};
26 interval: Duration,
148 pub fn bucket_interval(&self) -> Duration { in bucket_interval() argument
190 pub fn set_bucket_interval(&mut self, interval: Duration) { in set_bucket_interval() argument
/smoltcp-0.9.1/src/phy/sys/
Dmod.rs3 use crate::time::Duration;
46 pub fn wait(fd: RawFd, duration: Option<Duration>) -> io::Result<()> { in wait()
/smoltcp-0.9.1/fuzz/
Dutils.rs15 use smoltcp::time::Duration;
155 device.set_bucket_interval(Duration::from_millis(shaping_interval)); in parse_middleware_options()
/smoltcp-0.9.1/src/iface/interface/
Digmp.rs3 use crate::time::{Duration, Instant};
234 IgmpVersion::Version1 => Duration::from_millis(100), in process_igmp()
Dmod.rs43 use crate::time::{Duration, Instant};
64 reassembly_timeout: Duration,
449 interval: Duration,
543 reassembly_timeout: Duration::from_secs(60), in new()
708 pub fn reassembly_timeout(&self) -> Duration { in reassembly_timeout() argument
714 pub fn set_reassembly_timeout(&mut self, timeout: Duration) { in set_reassembly_timeout() argument
715 if timeout > Duration::from_secs(60) { in set_reassembly_timeout()
824 pub fn poll_delay(&mut self, timestamp: Instant, sockets: &SocketSet<'_>) -> Option<Duration> { in poll_delay() argument
827 Some(_) => Some(Duration::from_millis(0)), in poll_delay()
/smoltcp-0.9.1/
DCHANGELOG.md126 - Use microseconds instead of milliseconds in Instant and Duration ([#514](https://github.com/smolt…