Fixed error checking on sleep and implemented usleep
Merge pull request #32 from sk-/master

Fixed error checking on sleep and implemented usleep