mirror of
https://github.com/simh/simh.git
synced 2026-01-25 19:56:25 +00:00
TIMER: Provide a means for VM to indicate its expected calibration rate
As reported and discussed in #817 This allows RUNLIMIT to provide useful results on fast or slow host systems.
This commit is contained in:
@@ -150,6 +150,8 @@ return real_sim_os_ms_sleep (msec);
|
||||
t_bool sim_idle_enab = FALSE; /* global flag */
|
||||
volatile t_bool sim_idle_wait = FALSE; /* global flag */
|
||||
|
||||
int32 sim_vm_initial_ips = SIM_INITIAL_IPS;
|
||||
|
||||
static int32 sim_precalibrate_ips = SIM_INITIAL_IPS;
|
||||
static int32 sim_calb_tmr = -1; /* the system calibrated timer */
|
||||
static int32 sim_calb_tmr_last = -1; /* shadow value when at sim> prompt */
|
||||
@@ -3471,7 +3473,7 @@ sim_idle_stable = 0;
|
||||
double
|
||||
sim_host_speed_factor (void)
|
||||
{
|
||||
if (sim_precalibrate_ips > SIM_INITIAL_IPS)
|
||||
if (sim_precalibrate_ips > sim_vm_initial_ips)
|
||||
return 1.0;
|
||||
return (double)SIM_INITIAL_IPS / (double)sim_precalibrate_ips;
|
||||
return (double)sim_vm_initial_ips / (double)sim_precalibrate_ips;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user