mintaka-hal 0.0.3

Mintaka HAL
Documentation
// Copyright (c) TribuFu. All Rights Reserved.

use sysinfo::{System, SystemExt};

pub(crate) fn GetSystemInfo() -> System {
    let mut sys = System::new();
    sys.refresh_all();
    sys
}

/// Returns the uptime of the current system.
pub fn GetSystemUptime() -> u64 {
    GetSystemInfo().uptime()
}

/// Returns the name of the current system.
pub fn GetSystemName() -> Option<String> {
    GetSystemInfo().name()
}

/// Returns the OS version of the current system.
pub fn GetSystemVersion() -> Option<String> {
    GetSystemInfo().os_version()
}

/// Returns the OS edition of the current system.
pub fn GetSystemEdition() -> Option<String> {
    GetSystemInfo().long_os_version()
}

/// Returns the kernel version of the current system.
pub fn GetKernelVersion() -> Option<String> {
    GetSystemInfo().kernel_version()
}

/// Returns the host name of the current system.
pub fn GetHostName() -> Option<String> {
    GetSystemInfo().host_name()
}