'When does the quantum start?

When talking about the scheduler in operating systems. Everytime a process is been executed the operating system gives it a quantum (the maximum time it can be executed without calling de scheduler). My doubt is, when the quantum expires, the next quantum is automatically started, or it waits for the context switch to be completely done to start?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source