Use nanosleep() in faked sleep() and usleep() to avoid rounding issues [rbalint/pr28]