I am trying to make a stopwatch program...but I keep freezing the program (at least it doesn't freeze C++ like VB froze itself)...

This is the code that does the actual time management:
PHP Code:
Pause(50000);
                
int active 1;
                
int milli 0;
                
int secs 0;
                
int mins =0;

                while(
active==1)  {
                    
milli++;
                    if(
milli>=10) {
                        
milli=0;
                        
secs++;
                    }
                    if(
secs>=60)  {
                        
secs=0;
                        
mins++;
                    }
                    
char buf[40];
                    
int m milli;
                    
itoa(mbuf10); // 10 is the radix (number base)
                    
SendMessage(ghWnd_milliWM_SETTEXT0, (LPARAM) (LPCTSTRitoa(mbuf10));
                    
int s secs;
                    
itoa(sbuf10); // 10 is the radix (number base)
                    
SendMessage(ghWnd_secsWM_SETTEXT0, (LPARAM) (LPCTSTRitoa(sbuf10));
                    
int mi mins;
                    
itoa(mibuf10); // 10 is the radix (number base)
                    
SendMessage(ghWnd_minsWM_SETTEXT0, (LPARAM) (LPCTSTRitoa(mibuf10));


//=======NOW IS A PAUSE FUNCTION=========
void Pause(unsigned long amount)
{  
//creates a delay with the duration of amount.
  
unsigned long t GetTickCount();
  while((
GetTickCount() - t) < amount);

how do I stop it from freezing?