In theory, calling "select()" (or the equivalent on Windows) with a wait time of zero returns immediately. However, this is a system call. In high CPU usage condition, the OS may decide to take the opportunity and schedule a different process. In that case, the wait might be much longer. Measuring that time might allow us to detect such high CPU conditions.
In theory, calling "select()" (or the equivalent on Windows) with a wait time of zero returns immediately. However, this is a system call. In high CPU usage condition, the OS may decide to take the opportunity and schedule a different process. In that case, the wait might be much longer. Measuring that time might allow us to detect such high CPU conditions.