about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2020-09-20 10:12:57 +0200
committerest31 <MTest31@outlook.com>2020-09-20 10:16:01 +0200
commitcebbd9fcd35a63569b8fb5c836b5a26089861c41 (patch)
treefc658cd5cd9102c38e378a0d436bfb7e74a7d044 /compiler/rustc_codegen_llvm/src
parent285fc7d704fcdd7b2a37d475d04d5d955490e000 (diff)
downloadrust-cebbd9fcd35a63569b8fb5c836b5a26089861c41.tar.gz
rust-cebbd9fcd35a63569b8fb5c836b5a26089861c41.zip
Use as_nanos in bench.rs and base.rs
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);