mirror of
https://github.com/open-simh/simh.git
synced 2026-01-25 19:57:36 +00:00
TIMER: Fix various inconsistent timing behaviors
- Support for arbitrary long wait intervals in sim_activate_after with precisely correct delays aligned with the calibrated clock once per second. - Proper handling of calls to sim_cancel for calibrated timer units - Properly allow stopping of calibrated clock by calling sim_rtcn_calb with a ticksper == 0 - Only schedule asynchronous timer activities for delays longer than the minimal OS sleep time - Only wake asynchronous timer thread to queue new timer events that are shorter than the currently shortest scheduled event
This commit is contained in:
@@ -542,6 +542,7 @@ struct UNIT {
|
||||
void *up8; /* device specific */
|
||||
void *tmxr; /* TMXR linkage */
|
||||
t_bool (*cancel)(UNIT *);
|
||||
double usecs_remaining; /* time balance for long delays */
|
||||
#ifdef SIM_ASYNCH_IO
|
||||
void (*a_check_completion)(UNIT *);
|
||||
t_bool (*a_is_active)(UNIT *);
|
||||
@@ -556,7 +557,7 @@ struct UNIT {
|
||||
/* Asynchronous Timer control */
|
||||
double a_due_time; /* due time for timer event */
|
||||
double a_due_gtime; /* due time (in instructions) for timer event */
|
||||
int32 a_usec_delay; /* time delay for timer event */
|
||||
double a_usec_delay; /* time delay for timer event */
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user