From a26ee01ca461291e21fd987b211a0fd6b1e3b436 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 3 Jun 1996 18:27:48 +0000 Subject: nanosleep now fills in the time remaining structure. --- cpukit/posix/src/time.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cpukit/posix/src/time.c') diff --git a/cpukit/posix/src/time.c b/cpukit/posix/src/time.c index 74e78133f3..a3ea633e7d 100644 --- a/cpukit/posix/src/time.c +++ b/cpukit/posix/src/time.c @@ -281,11 +281,10 @@ int nanosleep( /* calculate time remaining */ if ( rmtp ) { + ticks -= + _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; - _POSIX_Interval_to_timespec( - _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time, - rmtp - ); + _POSIX_Interval_to_timespec( ticks, rmtp ); } return 0; /* XXX should account for signal */ -- cgit v1.2.3