Better understanding the mechanism responsible for adjusting the time (NTP) on ESP8266

Here's an example directly from this forum.

If you have the WiFi you cannot block for more than a few hundred ms before the wdt will reset the code.