I am just interested how sleep(time in ms) is implemented in C lib or basically at the os level..
I am guessing ..
1) may be the based on the processor speed you do a while loop of nop's ( not sure if the sleep time will be accurate)..
2) any special register in processor , where u write some value and the processor simply halts for specified time ( this would be very in efficient as the processor can't run even other programs)
any clues? probably C Lib source code can explain??? I am not too particular about how "C" is implementing it.. Just wondering in general how "sleep()" function is implemented..