At Sun, 30 Jan 2005 23:20:06 +0100,
Macrus Brinkmann wrote:
> 2005-01-30 Marcus Brinkmann <[EMAIL PROTECTED]>
>
> * sysdeps/mach/nanosleep.c (__nanosleep): Calculate remaining
> time, not elapsed time.
Now that was a messed up patch. Here is a new version of the code
within the if block. Still untested, but at least it compiles.
struct timeval requested;
struct timeval elapsed;
struct timeval remain;
TIMESPEC_TO_TIMEVAL (&requested, requested_time);
timersub (&after, &before, &elapsed);
if (timercmp (&requested, &elapsed, <))
timerclear (&remain);
else
timersub (&requested, &elapsed, &remain);
TIMEVAL_TO_TIMESPEC (&remain, remaining);
_______________________________________________
Bug-hurd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-hurd