1 Reply Latest reply on Jul 11, 2016 5:45 AM by renejos

    SDK-3.7.0: Very log delay in sntp_start_auto_time_sync call

    axel.lin_1746341

      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?