/** * CpuUsage CPU 使用率 */ export interface CpuUsage { /** 用户态 CPU 时间(秒) */ user: number; /** 内核态 CPU 时间(秒) */ system: number; } /** * MemoryInfo 内存信息 */ export interface MemoryInfo { /** 总内存(字节) */ total: number; /** 可用内存(字节) */ available: number; /** 已用内存(字节) */ used: number; } /** * 进程 API 接口 */ export interface ProcessAPI { /** 获取系统运行时长(秒) */ getUptime: () => Promise; /** 获取 CPU 使用率 */ getCpuUsage: () => Promise; /** 获取内存信息 */ getMemoryInfo: () => Promise; /** 获取主机名 */ hostname: () => Promise; /** 获取所有环境变量 */ env: () => Promise>; /** 终止指定进程 */ kill: (pid: number) => Promise; } /** * 进程与系统运行时信息 API */ export declare const process: ProcessAPI; //# sourceMappingURL=process.d.ts.map