fix(gateway): restrict elapsed_us to Linux

The admission-limit change added elapsed_us without the target_os
guard every other item in the binary carries, so fips-gateway failed
to compile on macOS, Windows and FreeBSD, where std::time::Instant is
not imported.
This commit is contained in:
Johnathan Corgan
2026-09-18 21:56:39 +00:00
parent 1e111fe044
commit 5df2ddd724
+1
View File
@@ -55,6 +55,7 @@ fn main() {
/// Microseconds since `started`, saturating, for the timing fields on debug
/// lines.
#[cfg(target_os = "linux")]
fn elapsed_us(started: Instant) -> u64 {
u64::try_from(started.elapsed().as_micros()).unwrap_or(u64::MAX)
}