* signal.cc (nanosleep): Fix bug in previous patch.

This commit is contained in:
Eric Blake 2009-12-19 00:58:34 +00:00
parent f16706de97
commit d954168ddb
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2009-12-18 Eric Blake <ebb9@byu.net>
* signal.cc (nanosleep): Fix bug in previous patch.
2009-12-18 Corinna Vinschen <corinna@vinschen.de>
Throughout, replace hMainProc with GetCurrentProcess/NtCurrentProcess

View File

@ -102,11 +102,11 @@ nanosleep (const struct timespec *rqtp, struct timespec *rmtp)
{
/* Divide user's input into transactions no larger than 49.7
days at a time. */
if (sec > HIRES_DELAY_MAX)
if (sec > HIRES_DELAY_MAX / 1000)
{
req = ((HIRES_DELAY_MAX * 1000 + resolution - 1)
req = ((HIRES_DELAY_MAX + resolution - 1)
/ resolution * resolution);
sec -= HIRES_DELAY_MAX;
sec -= HIRES_DELAY_MAX / 1000;
}
else
{