Fixed typos
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 pull request #477 from someone42/master

Changes to queueing strategy for BitBurner boards
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.
Add necessary time header include to avalon driver.
Add rt lib linkage to enable use of clock_nanosleep functions with older glibc.
Add a ms_to_timespec helper function, and create a cgsleep_ms function that uses absolute timers with clock_nanosleep to avoid overruns.
Make the nmsleep and nusleep functions use the new cgsleep functions internally till functions are migrated to the new cgsleep API.
Provide reentrant versions of cgsleep functions to allow start time to be set separately from the beginning of the actual sleep, allowing scheduling delays to be counted in the sleep.
Use the reentrant cgsleep function to time sleeps on reading from avalon.
Set high resolution timing on windows within the cgsleep functions.
Use the reentrant cgsleep functions within the avalon_send_tasks function.
Use the cgsleep reentrant function in avalon_send_task.
Make the cgsleep functions build on windows.