From 8917a7ef886a6d5e21feb0e78217b321fa2b58cd Mon Sep 17 00:00:00 2001 From: Ian Simonson Date: Wed, 13 Mar 2024 14:51:17 -0700 Subject: [PATCH] Make RUsage more inline with macos man page Swap to tabs to adhere to the Odin Core library standard and also rename the rusage fields to match the actual definitions from the macos bsd man pages --- core/sys/darwin/darwin.odin | 39 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/core/sys/darwin/darwin.odin b/core/sys/darwin/darwin.odin index 8009b72bd..ed4783816 100644 --- a/core/sys/darwin/darwin.odin +++ b/core/sys/darwin/darwin.odin @@ -3,26 +3,27 @@ package darwin Bool :: b8 -timespec :: struct { - seconds: int, - microseconds: int, +timeval :: struct { + tv_sec: int, + tv_usec: int, } RUsage :: struct { - utime: timespec, - stime: timespec, - maxrss_word: int, - ixrss_word: int, - idrss_word: int, - isrss_word: int, - minflt_word: int, - majflt_word: int, - nswap_word: int, - inblock_word: int, - oublock_word: int, - msgsnd_word: int, - msgrcv_word: int, - nsignals_word: int, - nvcsw_word: int, - nivcsw_word: int, + ru_utime: timeval, + ru_stime: timeval, + ru_maxrss: int, + ru_ixrss: int, + ru_idrss: int, + ru_isrss: int, + ru_minflt: int, + ru_majflt: int, + ru_nswap: int, + ru_inblock: int, + ru_oublock: int, + ru_msgsnd: int, + ru_msgrcv: int, + ru_nsignals: int, + ru_nvcsw: int, + ru_nivcsw: int, } +