Added setting of the timer resolution in the Win32 implementation of Sleep and rewrote the Unix Sleep implementation to use nanosleep instead of pthread_cond_timedwait to prevent spurious wakeups from causing the function to return too early.