- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found the system time is inaccurate, it's slower...
Here is how I test it: (Test with freeRTOS build)
1. The sntp sync will set and print the new time
So I add below code to show the time before updating by sntp:
--- a/43xxx_Wi-Fi/libraries/protocols/SNTP/sntp.c
+++ b/43xxx_Wi-Fi/libraries/protocols/SNTP/sntp.c
@@ -318,7 +318,10 @@ wiced_result_t sync_ntp_time( void* arg )
else
{
wiced_utc_time_ms_t utc_time_ms = (uint64_t)current_time.seconds * (uint64_t)1000 + ( current_time.microseconds / 1000 );
+ wiced_iso8601_time_t old_iso8601_time;
+ wiced_time_get_iso8601_time( &old_iso8601_time );
+ WPRINT_LIB_INFO( ("Old time is: %.27s\n", (char*)&old_iso8601_time) );
/* Set & Print the time */
wiced_time_set_utc_time_ms( &utc_time_ms );
2. Build snip.sntp_get_time with below changes:
A simple test is change TIME_SYNC_PERIOD to (1 * days) and check the timestamp output after 1 day.
3. A more practice test is adding below code to your real projects:
sntp_start_auto_time_sync( TIME_SYNC_PERIOD );
What I observed is seconds to minutes diff shown by Old time and Current time.
- Tags:
- 00452232