Lines Matching refs:Duration
5 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
201 router_lifetime: Duration,
202 reachable_time: Duration,
203 retrans_time: Duration,
522 router_lifetime: Duration::from_secs(900), in create_repr()
523 reachable_time: Duration::from_millis(900), in create_repr()
524 retrans_time: Duration::from_millis(900), in create_repr()
538 assert_eq!(packet.router_lifetime(), Duration::from_secs(900)); in test_router_advert_deconstruct()
539 assert_eq!(packet.reachable_time(), Duration::from_millis(900)); in test_router_advert_deconstruct()
540 assert_eq!(packet.retrans_time(), Duration::from_millis(900)); in test_router_advert_deconstruct()
552 packet.set_router_lifetime(Duration::from_secs(900)); in test_router_advert_construct()
553 packet.set_reachable_time(Duration::from_millis(900)); in test_router_advert_construct()
554 packet.set_retrans_time(Duration::from_millis(900)); in test_router_advert_construct()