If you take a look at the clock_gettime() function, which is available in all BSDs and is actually defined as part of the POSIX standard, you see that there is support for a
As far as I know, sleep functions are usually implemented more like a decrementing counter. You say "sleep for 10 seconds," that translates into "sleep for 1000 schedule ticks" in the scheduler, and then every time the scheduler checks on sleeping processes it decrements the amount of time left.
In this way, the sleep time will always be an amount of real time to sleep, as opposed to sleeping until some time in the future. The reason for this is as you've suspected, if we pick a time in the future we might never get there (or might get there in an unexpected amount of time). This is consistent with what you would want to use sleep for in a program. It's not meant to do calendar-like calculations.
You can also make a simple test, make a program sleep for 30 seconds, use the nix "time" command to time how long the function runs, and after it starts change your system clock back 5 minutes and see what happens.
The thread will be checking on an internal counter that is set to the duration of the sleep not to the end point of the sleep. The internal counter used has nothing to do with the current system time and therefore will not be affected if any changes occur in the system time.