Andy-Python-Programmer / aero

Aero is a new modern, experimental, UNIX-like operating system following the monolithic kernel design. Supporting modern PC features such as long mode, 5-level paging, and SMP (multicore), to name a few.
https://aero.andypy.dev
GNU General Public License v3.0
1.17k stars 50 forks source link

Fix doomgeneric patch DG_SleepMs #69

Closed Kyota-exe closed 2 years ago

Kyota-exe commented 2 years ago

This PR fixes the conversion from milliseconds to microseconds, unless I'm just really bad at math.

Vinix also seems to get this wrong (I'm guessing Andy yoinked part of the doomgeneric patch from Vinix), I'll PR there too if this PR gets approved (thus confirming that I'm not just really stupid).

Andy-Python-Programmer commented 2 years ago

Thanks @Kyota-exe! Yes, usleep takes in the duration in microseconds and 1 ms = 1000 µs. The current calculation would have been correct if the time provided was in seconds.