Skip to content

Instantly share code, notes, and snippets.

@duane
Created December 14, 2011 06:55
Show Gist options
  • Save duane/1475558 to your computer and use it in GitHub Desktop.
Save duane/1475558 to your computer and use it in GitHub Desktop.
#[cfg(target_os = "macos")]
native mod c {
fn mach_absolute_time() -> u64;
}
#[cfg(target_os = "macos")]
#[link_name=""]
#[link_args = "-framework CoreServices"]
native mod CoreServices {
fn AbsoluteToNanoseconds(abs: *u64) -> u64;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment