AltairZ80, BESM6, I7094: Adopt internal SCP internal time base

This commit is contained in:
Mark Pizzolato 2020-10-29 13:28:41 -07:00
parent 9c1f4beae3
commit 263e0e7ed5
6 changed files with 9 additions and 9 deletions

View file

@ -1774,7 +1774,7 @@ static int32 simh_out(const int32 port, const int32 data) {
break;
case getClockZSDOSCmd:
time(&now);
sim_get_time(&now);
now += ClockZSDOSDelta;
currentTime = *localtime(&now);
currentTimeValid = TRUE;
@ -1786,7 +1786,7 @@ static int32 simh_out(const int32 port, const int32 data) {
break;
case getClockCPM3Cmd:
time(&now);
sim_get_time(&now);
now += ClockCPM3Delta;
currentTime = *localtime(&now);
currentTimeValid = TRUE;

View file

@ -379,7 +379,7 @@ unsigned int m68k_cpu_read_long(unsigned int address) {
case DISK_STATUS:
return hdsk_getStatus();
case M68K_GET_TIME:
return (unsigned int)(time(NULL));
return (unsigned int)(sim_get_time(NULL));
default:
break;
}

View file

@ -378,7 +378,7 @@ static uint8 SS1_Read(const uint32 Addr)
" RD: RTC Cmd=0x%02x.\n", PCX, cData);
break;
case SS1_RTC_DATA:
time(&now);
sim_get_time(&now);
now += ss1_rtc[0].clockDelta;
currentTime = *localtime(&now);

View file

@ -819,7 +819,7 @@ void check_initial_setup ()
/* Яч. ГОД обновляем самостоятельно */
time_t t;
t_value date;
time(&t);
sim_get_time(&t);
d = localtime(&t);
++d->tm_mon;
date = (t_value) (d->tm_mday / 10) << 33 |

View file

@ -239,7 +239,7 @@ t_stat vt_clk (UNIT * this)
}
tmxr_linemsg (t, buf);
tty_idle_count[num] = 0;
tty_last_time[num] = time (0);
tty_last_time[num] = sim_get_time (0);
sprintf (buf, "%.24s from %s\r\n",
ctime (&tty_last_time[num]),
t->ipad);
@ -1061,7 +1061,7 @@ int vt_getc (int num)
/* A telnet line. */
c = tmxr_getc_ln (t);
if (! (c & TMXR_VALID)) {
now = time (0);
now = sim_get_time (0);
if (now > tty_last_time[num] + 5*60) {
++tty_idle_count[num];
if (tty_idle_count[num] > 3) {
@ -1075,7 +1075,7 @@ int vt_getc (int num)
return -1;
}
tty_idle_count[num] = 0;
tty_last_time[num] = time (0);
tty_last_time[num] = sim_get_time (0);
if (tty_unit[num].flags & TTY_CMDLINE_MASK) {
/* Continuing CLI mode. */

View file

@ -90,7 +90,7 @@ struct tm *tptr;
if (bufsiz < 12)
return 0;
curtim = time (NULL); /* get time */
curtim = sim_get_time (NULL); /* get time */
tptr = localtime (&curtim); /* decompose */
if (tptr == NULL) /* error? */
return 0;