Skip to content

uptime ​

uptime returns how many seconds have elapsed since the system itself last booted.

Signatureuptime(): u64
tyrus
import { uptime } from "tyrus:os";

const seconds: u64 = uptime();
print(`up for ${seconds}s`);

Not the current process's own uptime

This is the system's uptime, not the running program's. For how long the current process has been running, use process.uptime().