I've read a few posts on how sleep works at the system level in Linux but I couldn't find whether or not the system determines the time to wake by creating a second/millisecond counter or by noting a time in the future to resume.
*This came about while working on a VM and saving its state while a process was sleeping. When told to wait for a certain amount of time, the time while the VM was saved did not count... so I'm guessing a counter of some sort is implemented.
If there is any differences or special cases for Python, Ruby, Java or C (i.e. they don't use the same system calls) please make a note of this in your answer.