Here are the details that I feel that you are actually asking this question after that:
SetTimer () first scans the list of non-nuclear timers (a doubly linked list) to see if a timer identifier already exists. If the timer exists, it will simply reset. If not, an HMAllocObject is called and creates space for the structure. Then the timer structure will be filled and attached to the list header.
This will be a common invoice for creating each of your 100 timers. This is exactly what the procedure does, with the exception of checking the min and max dwElapsed parameters.
As the timer expires, the timer list is scanned (approximately) for the duration of the shortest timer duration observed during the last scan of the timer list. (In fact, what happens is that the kernel timer is set to the duration of the smallest user timer, and this kernel timer wakes up a thread that checks the expiration of the user timer and wakes up the corresponding threads, setting a flag in their message queue status.)
For each timer in the list, the current delta between the last (in ms) list of the timer was scanned and the current time (in ms) decreases with each timer in the list. When one of them (<= 0 remains), it is marked as βreadyβ in its own structure, and a pointer to the stream information is read from the timer structure and used to wake up the corresponding stream by setting the stream flag QS_TIMER. Then it increments your CurrentTimersReady message queue. This all timer expires. Messages not sent.
When your main message channel calls GetMessage (), when there are no other messages, GetMessage () checks the QS_TIMER in your wake-up bits, and if set, generates a WM_TIMER message by scanning the full timer of the list user for the smallest timer in the list marked by READY and associated with your stream id. Then it decreases your stream CurrentTimersReady count, and if 0, clears the bit by timer. The next call to GetMessage () will cause all this to happen until all timers are exhausted.
One shot timers are saved. When they expire, they are marked as WAITING. The next call to SetTimer () with the same timer id will simply update and activate the original again. Both one shot and periodic timers reset themselves and only die with KillTimer or when your thread or window is destroyed.
The implementation of Windows is very simple, and I think it would be trivial if you write a more efficient implementation.