This repository was archived by the owner on May 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ jemallocator = "0.5"
1212rustc-serialize = { version = " 0.3" , optional = true }
1313serde = { version = " 1.0" , features = [" derive" ], optional = true }
1414serde_json = { version = " 1.0" , optional = true }
15- time = " 0.3"
1615simd-json = { version = " 0.7" , optional = true }
1716simd-json-derive = { version = " 0.7" , optional = true }
1817
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ pub use self::copy::*;
4343pub mod canada;
4444
4545use std:: env;
46+ use std:: time:: Duration ;
4647
4748pub fn num_trials ( ) -> Option < usize > {
4849 let mut opts = getopts:: Options :: new ( ) ;
@@ -53,8 +54,8 @@ pub fn num_trials() -> Option<usize> {
5354 matches. opt_str ( "n" ) . map ( |s| s. parse ( ) . unwrap ( ) )
5455}
5556
56- pub fn throughput ( dur : time :: Duration , bytes : usize ) -> u64 {
57- let mut megabytes_per_second = bytes as u64 / dur. whole_microseconds ( ) as u64 ;
57+ pub fn throughput ( dur : Duration , bytes : usize ) -> u64 {
58+ let mut megabytes_per_second = bytes as u64 / dur. as_micros ( ) as u64 ;
5859
5960 // Round to two significant digits.
6061 if megabytes_per_second > 100 {
Original file line number Diff line number Diff line change 11use std:: cmp;
2-
3- use time:: { Duration , Instant } ;
2+ use std:: time:: { Duration , Instant } ;
43
54pub fn bench < T , F > ( trials : usize , f : F ) -> Duration
65where
You can’t perform that action at this time.
0 commit comments