mirror of
https://github.com/simh/simh.git
synced 2026-02-08 09:12:10 +00:00
PDP10: Fix 2% wallclock issue for 50 Hz systems (R. Voorhorst)
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
tim timer subsystem
|
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-Apr-12 RMS Removed absolute scheduling on reset
|
||||||
18-Jun-07 RMS Added UNIT_IDLE flag
|
18-Jun-07 RMS Added UNIT_IDLE flag
|
||||||
03-Nov-06 RMS Rewritten to support idling
|
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;
|
if (new_interval & TIM_HWRE_MASK) tim_new_period += 010000;
|
||||||
|
|
||||||
/* clk_tps is the new number of clocks ticks per second */
|
/* 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. */
|
/* 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) ;
|
tim_mult = (clk_tps <= TIM_TMXR_FREQ) ? 1 : (clk_tps / TIM_TMXR_FREQ) ;
|
||||||
|
|||||||
Reference in New Issue
Block a user