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.
1 parent 5667bbe commit 7077f20Copy full SHA for 7077f20
fc_util/src/lib.rs
@@ -5,10 +5,14 @@ extern crate libc;
5
6
pub mod validators;
7
8
-#[cfg(target_arch = "x86_64")]
9
pub fn timestamp_cycles() -> u64 {
+ #[cfg(target_arch = "x86_64")]
10
// Safe because there's nothing that can go wrong with this call.
11
- unsafe { std::arch::x86_64::_rdtsc() as u64 }
+ unsafe {
12
+ std::arch::x86_64::_rdtsc() as u64
13
+ }
14
+ #[cfg(not(target_arch = "x86_64"))]
15
+ 0
16
}
17
18
fn timespec_to_us(time_struct: &libc::timespec) -> u64 {
0 commit comments