about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-09-21 10:40:39 +0200
committerGitHub <noreply@github.com>2020-09-21 10:40:39 +0200
commit048866bd6b74ef34a8a2e1a3e89f9617834a5d05 (patch)
treeb6fbd667abecb8dffbbdf7a00d7429107500dc12 /compiler/rustc_codegen_llvm/src
parentb670b86353ac42b98a969de6f804f9718a56097d (diff)
parent43193dcb882466163436057e50c96bb74d9bf50f (diff)
downloadrust-048866bd6b74ef34a8a2e1a3e89f9617834a5d05.tar.gz
rust-048866bd6b74ef34a8a2e1a3e89f9617834a5d05.zip
Rollup merge of #76958 - est31:ns, r=oli-obk
Replace manual as_nanos and as_secs_f64 reimplementations
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/base.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/base.rs b/compiler/rustc_codegen_llvm/src/base.rs
index 6a1b373ef07..f35708b1d09 100644
--- a/compiler/rustc_codegen_llvm/src/base.rs
+++ b/compiler/rustc_codegen_llvm/src/base.rs
@@ -108,7 +108,7 @@ pub fn compile_codegen_unit(
 
     // We assume that the cost to run LLVM on a CGU is proportional to
     // the time we needed for codegenning it.
-    let cost = time_to_codegen.as_secs() * 1_000_000_000 + time_to_codegen.subsec_nanos() as u64;
+    let cost = time_to_codegen.as_nanos() as u64;
 
     fn module_codegen(tcx: TyCtxt<'_>, cgu_name: Symbol) -> ModuleCodegen<ModuleLlvm> {
         let cgu = tcx.codegen_unit(cgu_name);