1
0
mirror of https://github.com/open-simh/simh.git synced 2026-02-05 16:15:49 +00:00
Files
open-simh.simh/sim_timer.c
Mark Pizzolato 7ebd22edaa TIMER: Fix sim_idle_ms_sleep() return value to be more precise
delta time computation converting the difference between two timespec
structures values to milliseconds previously truncated the difference which,
depending on the value of when the starting value in the delta happened,
along with when an OS clock tick occurred, may have resulted in a small
delta and an apparent sleep time of 0.  A more accurate result is produced
when the conversion from nanoseconds to milliseconds is rounded up
before the usecs/nsecs are truncated.
2020-04-28 07:10:57 -07:00

142 KiB