feat: add time syscall & command in shell

This commit is contained in:
2026-02-18 17:34:36 +01:00
parent ea0d909f68
commit dfa86b272c
14 changed files with 171 additions and 3 deletions
+10
View File
@@ -39,6 +39,16 @@ namespace Zenith {
static constexpr uint64_t SYS_GETARGS = 25;
static constexpr uint64_t SYS_RESET = 26;
static constexpr uint64_t SYS_SHUTDOWN = 27;
static constexpr uint64_t SYS_GETTIME = 28;
struct DateTime {
uint16_t Year;
uint8_t Month;
uint8_t Day;
uint8_t Hour;
uint8_t Minute;
uint8_t Second;
};
struct FbInfo {
uint64_t width;
+3
View File
@@ -176,6 +176,9 @@ namespace zenith {
if (rows) *rows = (int)(r >> 32);
}
// Timekeeping (wall-clock)
inline void gettime(Zenith::DateTime* out) { syscall1(Zenith::SYS_GETTIME, (uint64_t)out); }
// Power management
[[noreturn]] inline void reset() {
syscall0(Zenith::SYS_RESET);