Fixed PIT timer reads.
This commit is contained in:
parent
b491d70a58
commit
b89e792f8f
1 changed files with 9 additions and 1 deletions
10
src/timer.h
10
src/timer.h
|
|
@ -16,7 +16,15 @@ extern int timer_start;
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#define timer_clock() timer_end_period(cycles)
|
||||
#define timer_clock() \
|
||||
do \
|
||||
{ \
|
||||
int diff = timer_start - cycles; \
|
||||
timer_count -= diff; \
|
||||
timer_start = cycles; \
|
||||
timer_process(); \
|
||||
timer_update_outstanding(); \
|
||||
} while (0)
|
||||
|
||||
void timer_process();
|
||||
void timer_update_outstanding();
|
||||
|
|
|
|||
Loading…
Reference in a new issue