Rewrote sleep() to remove int/long typing assumptions between the argument to the function and the timespec structure.