Rev 2044 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2044 | Rev 2067 | ||
---|---|---|---|
Line 97... | Line 97... | ||
97 | drift = tick_read() - CPU->arch.next_tick_cmpr; |
97 | drift = tick_read() - CPU->arch.next_tick_cmpr; |
98 | while (drift > CPU->arch.clock_frequency / HZ) { |
98 | while (drift > CPU->arch.clock_frequency / HZ) { |
99 | drift -= CPU->arch.clock_frequency / HZ; |
99 | drift -= CPU->arch.clock_frequency / HZ; |
100 | CPU->missed_clock_ticks++; |
100 | CPU->missed_clock_ticks++; |
101 | } |
101 | } |
102 | CPU->arch.next_tick_cmpr = tick_read() + (CPU->arch.clock_frequency / HZ) |
102 | CPU->arch.next_tick_cmpr = tick_read() + (CPU->arch.clock_frequency / |
103 | - drift; |
103 | HZ) - drift; |
104 | tick_compare_write(CPU->arch.next_tick_cmpr); |
104 | tick_compare_write(CPU->arch.next_tick_cmpr); |
105 | clock(); |
105 | clock(); |
106 | } |
106 | } |
107 | 107 | ||
108 | /** @} |
108 | /** @} |