title: Ethernet begin blocks for 60 seconds if there's no Ethernet cable
body: <p>I'm building a clock. I want to set the clock by plugging an Ethernet cable into the clock. Most of the time the clock would not be plugged into the Internet. </p>
  
  <p>I have an Arduino board and an Ethernet <a href="http://www.arduino.cc/en/Main/ArduinoShields" rel="nofollow">shield</a> that can successfully connect to a time server and read the time (See the UdpNtpClient example file under Examples > Ethernet).</p>
  
  <p>The problem is that to configure the Ethernet shield, the <code>Ethernet.begin()</code> call blocks for 60&nbsp;sec if the shield is not connected to the Internet. I would like the clock to tell the time and periodically check to see if it has an Ethernet cable plugged in, and if so, make any corrections to the time. Most of the time this check is going to have a negative result, however, so I can't have the clock freeze for 60&nbsp;sec each time.</p>
  
  <p>Is it is possible to detect if the cable is connected in a quicker way than the <code>Ethernet.begin()</code> function? Is it possible to write a "multithreading" solution, where <code>Ethernet.begin()</code> is non-blocking?</p>