- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
While testing SDK-3.7.0 sntp_get_time snip code, we found a very log
delay in sntp_start_auto_time_sync() call.
In sntp_start_auto_time_sync(), has it calls
wiced_crypto_get_random(&random_initial, 1);
wiced_rtos_delay_milliseconds(300 * (unsigned int)random_initial);
before calling sync_ntp_time()
Below print out the random_initial value in my test.
random_initial=95
random_initial=185
random_initial=239
random_initial=247
So it means it will delay "300 * random_initial / 1000" seconds.
In above cases:
It delays 28 seconds/ 55 seconds/ 71 seconds / 74 seconds.
For systems calling sntp_start_auto_time_sync() during boot,
this increases a lot of boot time.
Are you sure this is correct thing to do?
- Labels:
-
SDK 3.x
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have noticed same behavior, for now I have removed the delay. It seems to be quite large wait times and exactly as you mentioned, it is not desired during a boot sequence.
Regards
René Josefsen