If I'm not mistaking, the C sleep function is one of the places a CPU timer is used.
Linux will set a timer and removes the process from the scheduler. Timer counts down and once it hits 0 it will interrupt the CPU and the OS will re-add the process to the scheduler. Am I correct about this?
If so then what happens if the timer value is larger than the number of bits the counter hardware can handle? Let's say the counter has a max of 23 bits and I need a 24 bit value (i.e I need to sleep for a long time).
Edit:
Also, what If we have multiple sleeps going on at the same time, more than the CPU has counters for?