* signal.cc (nanosleep): Fix bug in previous patch.
This commit is contained in:
		| @@ -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> | 2009-12-18  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
| 	Throughout, replace hMainProc with GetCurrentProcess/NtCurrentProcess | 	Throughout, replace hMainProc with GetCurrentProcess/NtCurrentProcess | ||||||
|   | |||||||
| @@ -102,11 +102,11 @@ nanosleep (const struct timespec *rqtp, struct timespec *rmtp) | |||||||
|     { |     { | ||||||
|       /* Divide user's input into transactions no larger than 49.7 |       /* Divide user's input into transactions no larger than 49.7 | ||||||
|          days at a time.  */ |          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); |                  / resolution * resolution); | ||||||
|           sec -= HIRES_DELAY_MAX; |           sec -= HIRES_DELAY_MAX / 1000; | ||||||
|         } |         } | ||||||
|       else |       else | ||||||
|         { |         { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user