summaryrefslogtreecommitdiffstats
path: root/c/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-03 18:27:48 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-03 18:27:48 +0000
commita26ee01ca461291e21fd987b211a0fd6b1e3b436 (patch)
tree10893e312b792a4bf088737651196431a6847088 /c/src
parentrenamed _POSIX_Time_Spec_to_interval to _POSIX_Timespec_to_interval (diff)
downloadrtems-a26ee01ca461291e21fd987b211a0fd6b1e3b436.tar.bz2
nanosleep now fills in the time remaining structure.
Diffstat (limited to 'c/src')
-rw-r--r--c/src/exec/posix/src/time.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/c/src/exec/posix/src/time.c b/c/src/exec/posix/src/time.c
index 74e78133f3..a3ea633e7d 100644
--- a/c/src/exec/posix/src/time.c
+++ b/c/src/exec/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 */