系统
Class: OS
提供操作系统信息和实用工具的单例类。
静态方法
getInstance
static getInstance(): OS
获取 OS 的单例实例。
- 返回: OS 实例
方法
cpu
cpu(): Promise<CPUInfo>
获取 CPU 信息。
- 返回:
Promise<CPUInfo>
date
date(): Promise<Date>
获取当前系统日期和时间。
- 返回:
Promise<Date>
echo
echo(message: string): Promise<string>
回显消息。
- 参数:
message: 要回显的消息
- 返回:
Promise<string>
接口
CPUInfo
interface CPUInfo {
architecture: string;
machine: string;
processor: string;
version: string;
}