b/
3491968 stop the hanging of dunkindonuts.com
Same as https://android-git.corp.google.com/g/#change,105743 but in Master.
Changed the waiting to 10 seconds each attempt after asking around.
Sometimes, a sync load can wait forever and lock up the network thread,
here we replace Wait() with TimedWait() with multiple tries to avoid locking.
Unfortunately, TimedWait() doesn't return anything and can't tell if it's
a timeout or a quick pass, so we query timeofday and allow a few seconds for
the system timing error.
Change-Id: I391fb3f815413f17b2927c1e90cbddab7faed071