1
0
mirror of https://github.com/open-simh/simh.git synced 2026-04-27 12:39:13 +00:00
Files
open-simh.simh/sim_timer.c
Mark Pizzolato 4a1cf3587f TIMER: Fix sim_timer_activate_after to avoid overflow
The conversion of time to instructions can overflow an int32 when the
current instructions per second is high and the delay interval is high.

We limit the instruction delay to the maximum value available in an int32,
which for essentially all cases won't matter since the resulting delay is used
for a drop dead timeout and doesn't need to be precise or it will be
canceled before it ever fires anyway.
2015-11-13 08:28:20 -08:00

56 KiB