Skip to content

Commit

Permalink
'dosutil.c' : clarified a comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Gray committed Jul 23, 2024
1 parent d7e7ec3 commit 3bdb2d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/dosutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ void PDC_napmsl( long ms)
/* We should convert from milliseconds to BIOS ticks by
multiplying by MAX_TICK and dividing by MS_PER_DAY. But
that would overflow, and we'd need floating point math.
The following is good to four parts per billion and
doesn't overflow (because 0 <= ms <= MAX_NAP_SPAN). */
47181/859 = MS_PER_DAY / MAX_TICK to within four parts per
billion and won't overflow (because 0 <= ms <= MAX_NAP_SPAN). */
ticks_to_wait = (ms * 859L + 2359L) / 47181L;
if( ms && !ticks_to_wait)
ticks_to_wait = 1;
Expand Down

0 comments on commit 3bdb2d8

Please sign in to comment.