Skip to content

Commit

Permalink
Fix example code snippet (#80)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Aggarwal <[email protected]>
  • Loading branch information
aggarg authored Nov 27, 2023
1 parent 727c50d commit 9170096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/doxygen/code_examples/example_sntp_client_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static void sntpClient_GetTime( SntpTimestamp_t * pCurrentTime )
( void ) clock_gettime( CLOCK_REALTIME, &currTime );

pCurrentTime->seconds = currTime.tv_sec;
pCurrentTime->fractions = ( currTime.tv_sec / 1000 ) * SNTP_FRACTION_VALUE_PER_MICROSECOND;
pCurrentTime->fractions = ( currTime.tv_nsec / 1000 ) * SNTP_FRACTION_VALUE_PER_MICROSECOND;
}
/* @[code_example_sntpgettime] */

Expand Down

0 comments on commit 9170096

Please sign in to comment.