mirror of
https://github.com/simh/simh.git
synced 2026-01-26 04:01:38 +00:00
TIMER: Run simulator pre-calibration for a minimum of 100ms
Faster host systems today can get very fast instruction execution rates for a short duration calibration test. These may be skewed by round off error, so we now run the calibration for a minimum of 100ms.
This commit is contained in:
@@ -3459,8 +3459,10 @@ sim_switches = saved_switches;
|
||||
sim_cancel (&SIM_INTERNAL_UNIT);
|
||||
sim_activate (&precalib_unit, sim_precalibrate_ips);
|
||||
start = sim_os_msec();
|
||||
sim_instr();
|
||||
end = sim_os_msec();
|
||||
do {
|
||||
sim_instr();
|
||||
end = sim_os_msec();
|
||||
} while ((end - start) < SIM_PRE_CALIBRATE_MIN_MS);
|
||||
sim_precalibrate_ips = (int32)(1000.0 * (sim_precalibrate_ips / (double)(end - start)));
|
||||
|
||||
for (tmr=0; tmr<=SIM_NTIMERS; tmr++) {
|
||||
|
||||
Reference in New Issue
Block a user