Add helper functions to convert timespec to timeval and vice versa.
Use timeval_to_spec helper in avalon driver.
Provide a us_to_timeval helper function.
Use the us_to_timeval helper function in the avalon driver.
Provide a us_to_timespec helper function.
Add a timeraddspec helper function.
Merge branch 'master' of github.com:ckolivas/cgminer
Do a sleep of the full duration it would take to do all the work using clock_nanosleep in avalon_send_tasks to avoid sleep overruns before polling to see if it's ready.