Merge pull request #393 from http-rs/fix-duration-parsing

attempt to fix duration parsing
This commit is contained in:
Yosh 2022-02-04 18:32:07 +01:00 committed by GitHub
commit 4ea8ff1c34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ fn parse_entry(s: &str) -> crate::Result<Metric> {
let millis: f64 = value.parse().map_err(|_| {
format_err!("Server timing duration params must be a valid double-precision floating-point number.")
})?;
dur = Some(Duration::from_secs_f64(millis / 1000.0));
dur = Some(Duration::from_secs_f64(millis) / 1000);
}
"desc" => {
// Ensure quotes line up, and strip them from the resulting output