File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
compiler/rustc_codegen_llvm/src Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ pub fn compile_codegen_unit(
108108
109109 // We assume that the cost to run LLVM on a CGU is proportional to
110110 // the time we needed for codegenning it.
111- let cost = time_to_codegen. as_secs ( ) * 1_000_000_000 + time_to_codegen . subsec_nanos ( ) as u64 ;
111+ let cost = time_to_codegen. as_nanos ( ) as u64 ;
112112
113113 fn module_codegen ( tcx : TyCtxt < ' _ > , cgu_name : Symbol ) -> ModuleCodegen < ModuleLlvm > {
114114 let cgu = tcx. codegen_unit ( cgu_name) ;
Original file line number Diff line number Diff line change @@ -98,10 +98,6 @@ fn fmt_thousands_sep(mut n: usize, sep: char) -> String {
9898 output
9999}
100100
101- fn ns_from_dur ( dur : Duration ) -> u64 {
102- dur. as_secs ( ) * 1_000_000_000 + ( dur. subsec_nanos ( ) as u64 )
103- }
104-
105101fn ns_iter_inner < T , F > ( inner : & mut F , k : u64 ) -> u64
106102where
107103 F : FnMut ( ) -> T ,
@@ -110,7 +106,7 @@ where
110106 for _ in 0 ..k {
111107 black_box ( inner ( ) ) ;
112108 }
113- ns_from_dur ( start. elapsed ( ) )
109+ start. elapsed ( ) . as_nanos ( ) as u64
114110}
115111
116112pub fn iter < T , F > ( inner : & mut F ) -> stats:: Summary
You can’t perform that action at this time.
0 commit comments