Skip to main content

OS

Class: OS

A singleton class that provides operating system information and utilities.

Static Methods

getInstance

static getInstance(): OS

Gets the singleton instance of OS.

  • Returns: OS instance

Methods

cpu

cpu(): Promise<CPUInfo>

Gets CPU information.

  • Returns: Promise<CPUInfo>

date

date(): Promise<Date>

Gets the current system date and time.

  • Returns: Promise<Date>

echo

echo(message: string): Promise<string>

Echoes a message back.

  • Parameters:
    • message: The message to echo
  • Returns: Promise<string>

Interfaces

CPUInfo

interface CPUInfo {
architecture: string;
machine: string;
processor: string;
version: string;
}