mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-12-12 16:03:50 +00:00
pass sysinfo to system.rs and uptime.rs (#6)
Some checks are pending
Rust / build (push) Waiting to run
Some checks are pending
Rust / build (push) Waiting to run
This commit is contained in:
parent
cd8ddc2177
commit
4d509839f5
3 changed files with 8 additions and 7 deletions
|
|
@ -40,9 +40,9 @@ pub fn get_root_disk_usage() -> Result<String, io::Error> {
|
|||
))
|
||||
}
|
||||
|
||||
pub fn get_memory_usage(info: SysInfo) -> String {
|
||||
pub fn get_memory_usage(info: &SysInfo) -> String {
|
||||
#[inline(always)]
|
||||
fn parse_memory_info(info: SysInfo) -> (f64, f64) {
|
||||
fn parse_memory_info(info: &SysInfo) -> (f64, f64) {
|
||||
let total_memory_kb = (info.ram_total() / 1024) as f64;
|
||||
let available_memory_kb = (info.ram_unused() / 1024) as f64;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue