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:
Brian Donovan authored and GitHub committed 2023-08-07 11:08:51 -05:00
1 parent 56c3dcc437
commit a025617db3
1 file changed
+2 -3
+2 -3
View File
@@ -236,10 +236,9 @@ pub fn build(config: &CrateConfig, quiet: bool) -> Result<BuildResult> {
}
}
let t_end = std::time::Instant::now();
Ok(BuildResult {
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 {
warnings: warning_messages,
elapsed_time: (t_start - std::time::Instant::now()).as_millis(),
elapsed_time: t_start.elapsed().as_millis(),
})
}