Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add time_value #25

Merged
merged 5 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mach-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ fn main() {
| "vm_page_info_basic"
| "vm_statistics"
| "task_dyld_info"
| "time_value"
| "fsid"
| "fsobj_id"
| "dyld_kernel_image_info"
Expand Down
1 change: 1 addition & 0 deletions mach-test/test/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use mach2::task_info::*;
use mach2::thread_act::*;
use mach2::thread_policy::*;
use mach2::thread_status::*;
use mach2::time_value::*;
use mach2::traps::*;
use mach2::vm::*;
use mach2::vm_attributes::*;
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub mod task_info;
pub mod thread_act;
pub mod thread_policy;
pub mod thread_status;
pub mod time_value;
pub mod traps;
pub mod vm;
pub mod vm_attributes;
Expand Down
11 changes: 11 additions & 0 deletions src/time_value.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use vm_types::integer_t;

#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Hash, PartialOrd, PartialEq, Eq, Ord)]
pub struct time_value {
pub seconds: integer_t,
pub microseconds: integer_t,
}
pub type time_value_t = time_value;

pub const TIME_MICROS_MAX: integer_t = 1000000;