style(ke): rename timecounter to time

This commit is contained in:
Loïc Grégoire
2026-03-28 01:25:06 -04:00
parent a589b5a56f
commit 35094cb298
7 changed files with 18 additions and 20 deletions
+2 -2
View File
@@ -228,7 +228,7 @@ pub fn block() void {
td.lock.acquire_no_ipl();
td.state = .Blocked;
td.sleep_start = ke.timecounter.read_time_nano();
td.sleep_start = ke.time.read_time_nano();
td.runq = null;
yield(ke.curcpu());
@@ -241,7 +241,7 @@ pub fn block() void {
pub fn unblock(td: *ke.Thread) void {
const ipl = td.lock.acquire();
td.sleep_time = (ke.timecounter.read_time_nano() - td.sleep_start) / std.time.ns_per_ms;
td.sleep_time = (ke.time.read_time_nano() - td.sleep_start) / std.time.ns_per_ms;
if (td.sleep_time >= config.CONFIG_SCHED_TIMESLICE and td.priority_class == .Batch) {
// If we have slept for more than a tick, update interactivity.