MCPcopy Create free account
hub / github.com/base/base / parse_positive_duration

Function parse_positive_duration

crates/execution/node/src/args.rs:117–123  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

115}
116
117fn parse_positive_duration(s: &str) -> Result<Duration, String> {
118 let d = humantime::parse_duration(s).map_err(|e| e.to_string())?;
119 if d.is_zero() {
120 return Err("duration must be greater than zero".to_owned());
121 }
122 Ok(d)
123}
124
125/// Runtime tuning options for the `RocksDB` proofs history backend.
126#[derive(Debug, Clone, Copy, PartialEq, Eq, clap::Args)]

Callers

nothing calls this directly

Calls 1

is_zeroMethod · 0.80

Tested by

no test coverage detected