We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 22944a8 + af7498e commit c08034dCopy full SHA for c08034d
test/src/bench.rs
@@ -98,10 +98,6 @@ fn fmt_thousands_sep(mut n: usize, sep: char) -> String {
98
output
99
}
100
101
-fn ns_from_dur(dur: Duration) -> u64 {
102
- dur.as_secs() * 1_000_000_000 + (dur.subsec_nanos() as u64)
103
-}
104
-
105
fn ns_iter_inner<T, F>(inner: &mut F, k: u64) -> u64
106
where
107
F: FnMut() -> T,
@@ -110,7 +106,7 @@ where
110
for _ in 0..k {
111
black_box(inner());
112
108
113
- ns_from_dur(start.elapsed())
109
+ start.elapsed().as_nanos() as u64
114
115
116
pub fn iter<T, F>(inner: &mut F) -> stats::Summary
0 commit comments