forked from extern/nushell
e266590813
* Fix ps command CPU usage on Apple Silicon M1 macs. #4142 The cpu user and system times returned my libproc are not in nanoseconds; they are in mach ticks units. This is not documented very well. The convert from mach ticks to ns, the kernel provides a timebase info function and datatype: https://developer.apple.com/documentation/driverkit/3433733-mach_timebase_info The commit makes the PS command work for me. * Cargo fmt of previous commit. * Clippy format suggestion Co-authored-by: Ondrej Baudys <ondrej.baudys@nextgen.net>
36 lines
1.1 KiB
TOML
36 lines
1.1 KiB
TOML
[package]
|
|
authors = ["The Nushell Project Developers", "procs creators"]
|
|
description = "Nushell system querying"
|
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-system"
|
|
name = "nu-system"
|
|
version = "0.67.1"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[[bin]]
|
|
name = "ps"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
libc = "0.2"
|
|
|
|
[target.'cfg(target_family = "unix")'.dependencies]
|
|
nix = "0.24"
|
|
atty = "0.2"
|
|
|
|
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
|
|
procfs = "0.14.0"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
libproc = "0.12.0"
|
|
errno = "0.2"
|
|
mach2 = "0.4"
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
winapi = { version = "0.3.9", features = ["tlhelp32", "fileapi", "handleapi", "ifdef", "ioapiset", "minwindef", "pdh", "psapi", "synchapi", "sysinfoapi", "winbase", "winerror", "winioctl", "winnt", "oleauto", "wbemcli", "rpcdce", "combaseapi", "objidl", "powerbase", "netioapi", "lmcons", "lmaccess", "lmapibuf", "memoryapi", "shellapi", "std", "securitybaseapi"] }
|
|
chrono = "0.4.21"
|
|
ntapi = "0.3"
|
|
once_cell = "1.0"
|