3 ms·
I did, but there are literal compile-time checks for various platforms. pub fn monotonic(self: *Self) u64 { const m = blk: { if (is_win
by holsta 2y ago
I did, but there are literal compile-time checks for various platforms.
pub fn monotonic(self: *Self) u64 {
const m = blk: {
if (is_windows) break :blk monotonic_windows();
if (is_darwin) break :blk monotonic_darwin();
if (is_linux) break :blk monotonic_linux();
@compileError("unsupported OS");
};
- arp242 2y agoThat genuinely seems platform-specific. Should be easy enough to write a patch to add support for $other_system.
- josephg 2y agoAccording to the talk I watched, tigerbeetle makes heavy use of io_uring on linux - which isn't part of POSIX. Adding freebsd support should be pretty easy. If it supports darwin, it'll probably already have an implementation built on top of freebsd's kqueue. Its probably just a case of wiring it up to use kqueue when built for freebsd.
- arp242 2y agoYes, that was my impression as well when I looked at it yesterday. The monotonic_linux() bit that's quoted is platform-specific because it uses CLOCK_BOOTTIME with clock_gettime(), but that seems supported on BSD systems as well. It's probably just that no one tried to run it, and no one spent any effort on it. I can't find a single mention of "BSD" in the issue tracker.
- josephg 2y ago> I can't find a single mention of "BSD" in the issue tracker. Sounds like this is something you can help with. If you care, open an issue.