PDP10-KA, PDP10-KL: Adopt internal SCP internal time base
This commit is contained in:
parent
8d6219325a
commit
e1ca936ab9
4 changed files with 5 additions and 5 deletions
|
@ -809,7 +809,7 @@ static void channel_command (uint64 data)
|
||||||
if (check_nxm (data, &n, &data2, &n2))
|
if (check_nxm (data, &n, &data2, &n2))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
(void)clock_gettime(CLOCK_REALTIME, &ts);
|
(void)sim_rtcn_get_time (&ts, 0);
|
||||||
latency_timer = ts.tv_nsec / 100000;
|
latency_timer = ts.tv_nsec / 100000;
|
||||||
latency_timer %= 254;
|
latency_timer %= 254;
|
||||||
M[data & ADDR] = latency_timer & 0377;
|
M[data & ADDR] = latency_timer & 0377;
|
||||||
|
@ -938,7 +938,7 @@ t_stat ai_devio(uint32 dev, uint64 *data) {
|
||||||
|
|
||||||
case CONI|4:
|
case CONI|4:
|
||||||
/* Latency timer, timer unit, attention unit. */
|
/* Latency timer, timer unit, attention unit. */
|
||||||
(void)clock_gettime(CLOCK_REALTIME, &ts);
|
(void)sim_rtcn_get_time (&ts, 0);
|
||||||
latency_timer = ts.tv_nsec / 100000;
|
latency_timer = ts.tv_nsec / 100000;
|
||||||
latency_timer %= 254;
|
latency_timer %= 254;
|
||||||
*data = (latency_timer << 022)
|
*data = (latency_timer << 022)
|
||||||
|
|
|
@ -70,7 +70,7 @@ DEVICE pclk_dev = {
|
||||||
*/
|
*/
|
||||||
t_stat pclk_devio(uint32 dev, uint64 *data)
|
t_stat pclk_devio(uint32 dev, uint64 *data)
|
||||||
{
|
{
|
||||||
time_t t=time(NULL);
|
time_t t=sim_get_time(NULL);
|
||||||
struct tm *dt;
|
struct tm *dt;
|
||||||
uint64 hour=12, minute=1, seconds=2, milliseconds=3;
|
uint64 hour=12, minute=1, seconds=2, milliseconds=3;
|
||||||
uint64 coni_word = ((minute&0xF)<<26) | (seconds<<20) | milliseconds;
|
uint64 coni_word = ((minute&0xF)<<26) | (seconds<<20) | milliseconds;
|
||||||
|
|
|
@ -77,7 +77,7 @@ DEVICE pd_dev = {
|
||||||
|
|
||||||
static uint64 pd_ticks (void)
|
static uint64 pd_ticks (void)
|
||||||
{
|
{
|
||||||
time_t t = time(NULL);
|
time_t t = sim_get_time(NULL);
|
||||||
struct tm *x = localtime(&t);
|
struct tm *x = localtime(&t);
|
||||||
uint64 seconds;
|
uint64 seconds;
|
||||||
seconds = 86400ULL * x->tm_yday;
|
seconds = 86400ULL * x->tm_yday;
|
||||||
|
|
|
@ -1026,7 +1026,7 @@ dte_function(UNIT *uptr)
|
||||||
|
|
||||||
case PRI_EMRDT: /* Request Date/Time */
|
case PRI_EMRDT: /* Request Date/Time */
|
||||||
{
|
{
|
||||||
time_t t = time(NULL);
|
time_t t = sim_get_time(NULL);
|
||||||
struct tm *tm = localtime(&t);
|
struct tm *tm = localtime(&t);
|
||||||
int yr = tm->tm_year + 1900;
|
int yr = tm->tm_year + 1900;
|
||||||
int tim = (((tm->tm_hour * 60) + tm->tm_min) * 60) +
|
int tim = (((tm->tm_hour * 60) + tm->tm_min) * 60) +
|
||||||
|
|
Loading…
Add table
Reference in a new issue