refactor(cli): use more semantic Instant::elapsed (#1307)
Plus, one of these was incorrectly subtracting the end time from the start time.
This commit is contained in:
1 parent
56c3dcc437
commit
a025617db3
1 file changed
+2
-3
@@ -236,10 +236,9 @@ pub fn build(config: &CrateConfig, quiet: bool) -> Result<BuildResult> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let t_end = std::time::Instant::now();
|
|
||||||
Ok(BuildResult {
|
Ok(BuildResult {
|
||||||
warnings: warning_messages,
|
warnings: warning_messages,
|
||||||
elapsed_time: (t_end - t_start).as_millis(),
|
elapsed_time: t_start.elapsed().as_millis(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,7 +359,7 @@ pub fn build_desktop(config: &CrateConfig, _is_serve: bool) -> Result<BuildResul
|
|||||||
|
|
||||||
Ok(BuildResult {
|
Ok(BuildResult {
|
||||||
warnings: warning_messages,
|
warnings: warning_messages,
|
||||||
elapsed_time: (t_start - std::time::Instant::now()).as_millis(),
|
elapsed_time: t_start.elapsed().as_millis(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user