(c: &mut Criterion)
| 144 | |
| 145 | #[cfg(not(target_os = "wasi"))] |
| 146 | pub(super) fn simple_clock_gettime_libc(c: &mut Criterion) { |
| 147 | c.bench_function("simple clock_gettime libc", |b| { |
| 148 | b.iter(|| { |
| 149 | let mut s = std::mem::MaybeUninit::<libc::timespec>::uninit(); |
| 150 | unsafe { |
| 151 | assert_eq!( |
| 152 | libc::clock_gettime(libc::CLOCK_MONOTONIC, s.as_mut_ptr()), |
| 153 | 0 |
| 154 | ); |
| 155 | let _ = s.assume_init(); |
| 156 | } |
| 157 | }) |
| 158 | }); |
| 159 | } |
| 160 | |
| 161 | #[cfg(not(target_os = "wasi"))] |
| 162 | pub(super) fn simple_getpid(c: &mut Criterion) { |
nothing calls this directly
no test coverage detected