also looking at this
fix: Zig 0.16.0-dev.2565 compatibility
#1
3 files
+8
-11
| @@ -8,7 +8,8 @@ const Certificate = crypto.Certificate; | ||
| 8 | 8 | |
| 9 | 9 | // Helper function for Zig 0.16 compatibility |
| 10 | 10 | fn getMilliTimestamp() i64 { |
| 11 | const ts = posix.clock_gettime(.REALTIME) catch return 0; | |
| 11 | var ts: std.c.timespec = undefined; | |
| 12 | if (std.c.clock_gettime(.REALTIME, &ts) != 0) return 0; | |
| 12 | 13 | return ts.sec * 1000 + @divFloor(ts.nsec, std.time.ns_per_ms); |
| 13 | 14 | } |
| 14 | 15 | |