Skip to content

Get CPU speed with TypeScript

import * as os from "os"

function getCurrentCPUInfo(): number {
    return os.cpus()[0].speed
See also  How to declare a boolean in TypeScript?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.