<p>Can someone please point me to the easiest way to have a timer in a Win32 service?</p>

<p>I suppose I could create a dummy window for this purpose or have a second thread do tick counts, but what's best? Is there a more elegant way?</p>

<p>Thanks in advance.</p>

You can use SetTimer to set the timer, then catch the WM_TIMER message in your message loop.
Example:
// Set a timer to expire in 10 seconds
SetTimer(hwnd,IDT_TIMER1, 10000,(TIMERPROC) NULL);
... then in message loop:
switch (wParam)
```
```
{ 

    case IDT_TIMER1: 

        // Boom goes the dynamite
```
```
You can also decleare a function of type TIMERPROC and have that be called when the timer expires, if you don't want to do the message loop handling.