Cygwin: Drop HZ usage in favor of MSPERSEC and CLOCKS_PER_SEC

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2018-02-12 22:08:42 +01:00
parent 58f72783ee
commit 01c643e49f
6 changed files with 25 additions and 19 deletions

View File

@ -132,7 +132,8 @@ timer_thread (VOID *x)
if (sleep_us > 0)
{
tt->sleepto_us = sleepto_us;
sleep_ms = (sleep_us + (USPERSEC/HZ) - 1) / (USPERSEC/HZ);
sleep_ms = (sleep_us + (USPERSEC / MSPERSEC) - 1)
/ (USPERSEC / MSPERSEC);
}
else
{