PDP10: Fix 2% wallclock issue for 50 Hz systems (R. Voorhorst)
This commit is contained in:
parent
8448580a3a
commit
d28834fbbf
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
tim timer subsystem
|
||||
|
||||
10-Nov-16 *** Fix wallclock issue for 50 Hz systems (R. Voorhorst)
|
||||
18-Apr-12 RMS Removed absolute scheduling on reset
|
||||
18-Jun-07 RMS Added UNIT_IDLE flag
|
||||
03-Nov-06 RMS Rewritten to support idling
|
||||
|
@ -291,7 +292,7 @@ tim_new_period = new_interval & ~TIM_HWRE_MASK;
|
|||
if (new_interval & TIM_HWRE_MASK) tim_new_period += 010000;
|
||||
|
||||
/* clk_tps is the new number of clocks ticks per second */
|
||||
clk_tps = (int32) ceil((double)TIM_HW_FREQ /(double)tim_new_period);
|
||||
clk_tps = (int32) round((double)TIM_HW_FREQ /(double)tim_new_period);
|
||||
|
||||
/* tmxr is polled every tim_mult clks. Compute the divisor matching the target. */
|
||||
tim_mult = (clk_tps <= TIM_TMXR_FREQ) ? 1 : (clk_tps / TIM_TMXR_FREQ) ;
|
||||
|
|
Loading…
Add table
Reference in a new issue