TMXR: Change output rate limit to 1 ms when cpu is stopped

As reported in #865

When instruction execution is stopped, forced mux output rate limiting
can't leverage instruction execution rate to time inter-character delays.
A direct sleep is used but that has a minimal granularity measured in
milliseconds.  The prior default for a non speed controlled line was 10ms
sleep between character output.  This has been changed to 1ms which
is reasonable for most situations.  Meanwhile, since the remote console
facility uses TMXR, and it has the reasonable ability to generate output
when instructions are not being executed, this is better but not perfect.
This commit is contained in:
Mark Pizzolato 2020-06-02 11:42:51 -07:00
parent 798389428c
commit 52c1b5416f

View file

@ -2209,7 +2209,7 @@ if ((lp->txbfd && !lp->notelnet) || (TXBUF_AVAIL(lp) > 1)) {/* room for char (+
tmxr_send_buffered_data (lp); /* put data on wire */ tmxr_send_buffered_data (lp); /* put data on wire */
sim_os_ms_sleep(((lp->txbps) && (lp->txdeltausecs > 1000)) ? /* rate limiting output slower than 1000 cps */ sim_os_ms_sleep(((lp->txbps) && (lp->txdeltausecs > 1000)) ? /* rate limiting output slower than 1000 cps */
(lp->txdeltausecs - 1000) / 1000 : (lp->txdeltausecs - 1000) / 1000 :
10); /* wait an approximate character delay */ 1); /* wait an approximate character delay */
} }
return SCPE_OK; /* char sent */ return SCPE_OK; /* char sent */
} }