Searched refs:parse_duration (Results 1 – 4 of 4) sorted by relevance
/third_party/rust/crates/humantime/src/ |
D | duration.rs | 230 pub fn parse_duration(s: &str) -> Result<Duration, Error> { in parse_duration() function 339 use super::{parse_duration, format_duration}; 345 assert_eq!(parse_duration("17nsec"), Ok(Duration::new(0, 17))); in test_units() 346 assert_eq!(parse_duration("17nanos"), Ok(Duration::new(0, 17))); in test_units() 347 assert_eq!(parse_duration("33ns"), Ok(Duration::new(0, 33))); in test_units() 348 assert_eq!(parse_duration("3usec"), Ok(Duration::new(0, 3000))); in test_units() 349 assert_eq!(parse_duration("78us"), Ok(Duration::new(0, 78000))); in test_units() 350 assert_eq!(parse_duration("31msec"), Ok(Duration::new(0, 31_000_000))); in test_units() 351 assert_eq!(parse_duration("31millis"), Ok(Duration::new(0, 31_000_000))); in test_units() 352 assert_eq!(parse_duration("6ms"), Ok(Duration::new(0, 6_000_000))); in test_units() [all …]
|
D | wrapper.rs | 6 use crate::duration::{self, parse_duration, format_duration}; 69 parse_duration(s).map(Duration) in from_str()
|
D | lib.rs | 26 pub use self::duration::{parse_duration, Error as DurationError};
|
/third_party/nghttp2/src/ |
D | shrpx_config.cc | 820 int parse_duration(ev_tstamp *dest, const StringRef &opt, in parse_duration() function 3019 return parse_duration(&config->conn.upstream.timeout.http2_read, opt, in parse_config() 3022 return parse_duration(&config->conn.upstream.timeout.read, opt, optarg); in parse_config() 3024 return parse_duration(&config->conn.upstream.timeout.write, opt, optarg); in parse_config() 3026 return parse_duration(&config->conn.downstream->timeout.read, opt, optarg); in parse_config() 3028 return parse_duration(&config->conn.downstream->timeout.write, opt, optarg); in parse_config() 3030 return parse_duration(&config->conn.downstream->timeout.connect, opt, in parse_config() 3033 return parse_duration(&config->http2.timeout.stream_read, opt, optarg); in parse_config() 3035 return parse_duration(&config->http2.timeout.stream_write, opt, optarg); in parse_config() 3059 return parse_duration(&config->conn.downstream->timeout.idle_read, opt, in parse_config() [all …]
|