Skip to content

Commit 021babe

Browse files
authored
Merge pull request #529 from uyjulian/timer_hotfix
fix: timer, make next compare event comparison signed
2 parents cb13dfe + bc23214 commit 021babe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ee/kernel/src/timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ void SetNextComp(u64 time_now)
294294
}
295295
timer_current = timer_current->timer_next;
296296
}
297-
if ((a0 - time_now) < 0x7333)
297+
if ((s64)(a0 - time_now) < (s64)0x7333)
298298
{
299299
SetT2_COMP((*T2_COUNT) + (0x7333 >> (((*T2_MODE) & 3) << 2)));
300300
SetT2_MODE((*T2_MODE) & (~(1 << 11)));

0 commit comments

Comments
 (0)