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 719d513 commit 6a1be43Copy full SHA for 6a1be43
ddcommon/src/rate_limiter.rs
@@ -54,7 +54,11 @@ fn now() -> u64 {
54
tv_nsec: 0,
55
};
56
unsafe { libc::clock_gettime(libc::CLOCK_MONOTONIC, &mut ts) };
57
- (ts.tv_sec as i64 * TIME_PER_SECOND + ts.tv_nsec as i64) as u64
+ #[cfg(target_pointer_width = "64")]
58
+ let result = (ts.tv_sec * TIME_PER_SECOND + ts.tv_nsec) as u64;
59
+ #[cfg(target_pointer_width = "32")]
60
+ let result = (ts.tv_sec as i64 * TIME_PER_SECOND + ts.tv_nsec as i64) as u64;
61
+ result
62
63
now
64
}
0 commit comments