Skip to content

Commit

Permalink
Minor fix to include/uvm/utils.h
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecb committed Nov 24, 2023
1 parent 4906f8b commit 83ee476
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ncc/include/uvm/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ void fixed_rate_update(u64 start_time, u64 rate_ms, void* callback)
{
assert(rate_ms > 0);

u64 time_taken = time_current_ms() - start_time;
u64 cur_time_ms = asm () -> u64 { syscall time_current_ms; };
u64 time_taken = cur_time_ms - start_time;

// Compute when to do the next update
u64 next_update = (time_taken > rate_ms)? (u64)0:(rate_ms - time_taken);
Expand Down

0 comments on commit 83ee476

Please sign in to comment.