mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
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:
parent
56c3dcc437
commit
a025617db3
1 changed files with 2 additions and 3 deletions
|
@ -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(),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue