Me and a friend were discussing how programming languages can perform asynchronous tasks, like waiting 15 seconds before performing another task, and we started a debate.
I know that computers have an internal clock that uses the CMOS battery that can keep track of time, but how does it know it has been 15 seconds since right now and since when I told it to wait 15 seconds without looping infinitely and performing conditional operations, or does it do that?