posix: nanosleep: optimize away a time conversion

updates #2732
This commit is contained in:
Gedare Bloom
2016-07-29 13:13:41 -04:00
parent f383f4bf6e
commit 842005e432

View File

@@ -201,8 +201,7 @@ int clock_nanosleep(
err = clock_gettime( CLOCK_REALTIME, &now );
if ( err != 0 )
return EINVAL;
_Timespec_From_ticks( relative_interval, &relative_ts );
_Timespec_Add_to( &now, &relative_ts );
_Timespec_Add_to( &now, rqtp );
ticks = _Watchdog_Ticks_from_timespec( &now );
err = nanosleep_helper( ticks, relative_interval, rmtp, WATCHDOG_ABSOLUTE );
} else if ( clock_id == CLOCK_MONOTONIC ) {