Skip to content

Commit ae1d3f0

Browse files
Saiiijchanwangfei_chen
andauthored
Remove redundant xTimerStart() in timer_settime (#37)
xTimerChangePeriod() already starts the timer. Signed-off-by: wangfei_chen <[email protected]> Co-authored-by: wangfei_chen <[email protected]>
1 parent 8339845 commit ae1d3f0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

FreeRTOS-Plus-POSIX/source/FreeRTOS_POSIX_timer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,7 @@ int timer_settime( timer_t timerid,
283283
else
284284
{
285285
/* Set the timer to expire at the it_value, then start it. */
286-
( void ) xTimerChangePeriod( xTimer, xNextTimerExpiration, portMAX_DELAY );
287-
xTimerCommandSent = xTimerStart( xTimer, xNextTimerExpiration );
286+
xTimerCommandSent = xTimerChangePeriod( xTimer, xNextTimerExpiration, xNextTimerExpiration );
288287

289288
/* Wait until the timer start command is processed. */
290289
while( ( xTimerCommandSent != pdFAIL ) && ( xTimerIsTimerActive( xTimer ) == pdFALSE ) )

0 commit comments

Comments
 (0)