summaryrefslogtreecommitdiff
path: root/kernel/drivers/cmos.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-12-09 23:27:58 +0100
committerAnton Kling <anton@kling.gg>2024-12-09 23:27:58 +0100
commit0a2e1f076786ff59bcc1fb6fdb066c0db2a5d77f (patch)
treeefb761545a810b798f60fa3cc800f440fc75f20c /kernel/drivers/cmos.c
parent4bd8a81cca44285402af2a5e26db267c44abe4f4 (diff)
timer: Use strings instead of direct int64_t to communicate with userland
This makes it easier to write and read from /dev/clock using shell scripts. The actual performance decrease will be minimal and the interface is not that perfect for proper time keeping anyways.
Diffstat (limited to 'kernel/drivers/cmos.c')
-rw-r--r--kernel/drivers/cmos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/drivers/cmos.c b/kernel/drivers/cmos.c
index bdb13cc..4223093 100644
--- a/kernel/drivers/cmos.c
+++ b/kernel/drivers/cmos.c
@@ -185,7 +185,7 @@ static i64 cmos_get_time(void) {
}
static void cmos_set_time(i64 time) {
- assert(time > 0); // TODO: Add support for time travelers
+ assert(time >= 0); // TODO: Add support for time travelers
u8 reg_b = cmos_get_register(0x0B);
u8 seconds = 0;