1
0
mirror of https://github.com/simh/simh.git synced 2026-05-17 18:34:24 +00:00

TIMER: Tolerate and record host system time jumps while idling

Additionally, tolerate clock change during initialization
This commit is contained in:
Mark Pizzolato
2026-04-05 20:04:18 -10:00
parent 070341a89f
commit 72b7d03184
2 changed files with 81 additions and 39 deletions

17
scp.c
View File

@@ -3172,10 +3172,13 @@ if (sim_emax <= 0)
sim_emax = 1;
if (sim_timer_init ()) {
fprintf (stderr, "Fatal timer initialization error\n");
if (sim_ttisatty())
read_line_p ("Hit Return to exit: ", cbuf, sizeof (cbuf) - 1, stdin);
free (targv);
return EXIT_FAILURE;
sim_exit_status = EXIT_FAILURE;
if (!register_check) {
if (sim_ttisatty())
read_line_p ("Hit Return to exit: ", cbuf, sizeof (cbuf) - 1, stdin);
free (targv);
return EXIT_FAILURE;
}
}
sim_register_internal_device (&sim_scp_dev);
sim_register_internal_device (&sim_expect_dev);
@@ -3220,9 +3223,9 @@ if (register_check) {
goto cleanup_and_exit;
}
sim_printf ("*** Good Registers in %s simulator.\n", sim_name);
if (argc < 2) { /* No remaining command arguments? */
sim_exit_status = EXIT_SUCCESS; /* then we're done */
goto cleanup_and_exit;
if ((argc < 2) || /* No remaining command arguments */
(sim_exit_status != EXIT_SUCCESS)) { /* OR prior error? */
goto cleanup_and_exit; /* then we're done */
}
}
if ((stat = sim_brk_init ()) != SCPE_OK) {