| ... | ... | @@ -61,7 +61,7 @@ pub fn timestamp() u64 { |
| 61 | 61 | /// Get the posix timestamp, UTC, in milliseconds |
| 62 | 62 | pub const milliTimestamp = switch (builtin.os) { |
| 63 | 63 | Os.windows => milliTimestampWindows, |
| 64 | | Os.linux => milliTimestampPosix, |
| 64 | Os.linux, Os.freebsd => milliTimestampPosix, |
| 65 | 65 | Os.macosx, Os.ios => milliTimestampDarwin, |
| 66 | 66 | else => @compileError("Unsupported OS"), |
| 67 | 67 | }; |
| ... | ... | @@ -179,7 +179,7 @@ pub const Timer = struct { |
| 179 | 179 | debug.assert(err != windows.FALSE); |
| 180 | 180 | self.start_time = @intCast(u64, start_time); |
| 181 | 181 | }, |
| 182 | | Os.linux => { |
| 182 | Os.linux, Os.freebsd => { |
| 183 | 183 | //On Linux, seccomp can do arbitrary things to our ability to call |
| 184 | 184 | // syscalls, including return any errno value it wants and |
| 185 | 185 | // inconsistently throwing errors. Since we can't account for |
| ... | ... | @@ -215,7 +215,7 @@ pub const Timer = struct { |
| 215 | 215 | var clock = clockNative() - self.start_time; |
| 216 | 216 | return switch (builtin.os) { |
| 217 | 217 | Os.windows => @divFloor(clock * ns_per_s, self.frequency), |
| 218 | | Os.linux => clock, |
| 218 | Os.linux, Os.freebsd => clock, |
| 219 | 219 | Os.macosx, Os.ios => @divFloor(clock * self.frequency.numer, self.frequency.denom), |
| 220 | 220 | else => @compileError("Unsupported OS"), |
| 221 | 221 | }; |
| ... | ... | @@ -236,7 +236,7 @@ pub const Timer = struct { |
| 236 | 236 | |
| 237 | 237 | const clockNative = switch (builtin.os) { |
| 238 | 238 | Os.windows => clockWindows, |
| 239 | | Os.linux => clockLinux, |
| 239 | Os.linux, Os.freebsd => clockLinux, |
| 240 | 240 | Os.macosx, Os.ios => clockDarwin, |
| 241 | 241 | else => @compileError("Unsupported OS"), |
| 242 | 242 | }; |