Class providing hardware and system diagnostics.

Static methods

staticgetCpuUsage():Float

Retrieves the current CPU usage percentage (0.0 to 100.0). Note: On some platforms, the first call may return 0.0 or -1.0 as it needs two samples to calculate usage.

Returns:

CPU usage percentage.

@:value({ path : "/" })staticgetDiskInfo(path:String = "/"):DiskInfo

Retrieves disk space information for the specified path.

Parameters:

path

The filesystem path (e.g., "/" on Unix, "C:\" on Windows).

Returns:

DiskInfo object.

staticgetMemoryInfo():MemoryInfo

Retrieves current RAM statistics in bytes.

Returns:

MemoryInfo object.