feat: add uptime

This commit is contained in:
utox39
2025-02-24 00:29:25 +01:00
parent 6a5203ab7e
commit 5a18bf34c1

View File

@@ -18,4 +18,8 @@ pub fn main() !void {
try stdout.print("Hostname: {s}\n", .{hostname}); try stdout.print("Hostname: {s}\n", .{hostname});
try bw.flush(); try bw.flush();
allocator.free(hostname); allocator.free(hostname);
const uptime = try os_module.getSystemUptime();
try stdout.print("Uptime: {} days, {} hours, {} minutes\n", .{ uptime.days, uptime.hours, uptime.minutes });
try bw.flush();
} }