Rev 2089 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2089 | Rev 2107 | ||
---|---|---|---|
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 / |
102 | CPU->arch.next_tick_cmpr = tick_read() + |
103 | HZ) - drift; |
103 | (CPU->arch.clock_frequency / 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 | /** @} |