mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Initial commit of NetBSD port
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//+build linux, darwin, freebsd, openbsd, haiku
|
||||
//+build linux, darwin, freebsd, openbsd, netbsd, haiku
|
||||
package unix
|
||||
|
||||
when ODIN_OS == .Darwin {
|
||||
@@ -65,7 +65,8 @@ seconds_since_boot :: proc "c" () -> f64 {
|
||||
return f64(ts_boottime.tv_sec) + f64(ts_boottime.tv_nsec) / 1e9
|
||||
}
|
||||
|
||||
|
||||
// TODO(phix): 'nanosleep' here might refere to the wrong version on NetBSD. Need to investigate this further.
|
||||
// Normally this is solved by just including 'time.h'. So I need to understand the macro-magic going on in there.
|
||||
inline_nanosleep :: proc "c" (nanoseconds: i64) -> (remaining: timespec, res: i32) {
|
||||
s, ns := nanoseconds / 1e9, nanoseconds % 1e9
|
||||
requested := timespec{tv_sec=s, tv_nsec=ns}
|
||||
|
||||
Reference in New Issue
Block a user