printf("\nSTARTING TIMING TEST\n");
PRINTF("\nSTARTING TIMING TEST\n");
speedtest(nsIImage *aTheImage,nsIRenderingContext *aSurface, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight,PRBool aOptimize){PRUint32    min,seconds,milli,i;SYSTEMTIME  thetime;  printf("\nSTARTING TIMING TEST\n");  ::GetSystemTime(&thetime);  min = thetime.wMinute;  seconds = thetime.wSecond;  milli = thetime.wMilliseconds;  if(aOptimize==PR_TRUE) {    nsIDeviceContext* deviceContext;    aSurface->GetDeviceContext(deviceContext);    aTheImage->Optimize(deviceContext);    NS_RELEASE(deviceContext);  }  for(i=0;i<200;i++)    aSurface->DrawImage(aTheImage,aX,aY,aWidth,aHeight);  ::GetSystemTime(&thetime);  min = thetime.wMinute-min;  if(min>0)    min = min*60;  seconds = min+thetime.wSecond-seconds;  if(seconds>0)    seconds = (seconds*1000)+thetime.wMilliseconds;  else    seconds = thetime.wMilliseconds;  milli=seconds-milli;  if(aOptimize==PR_TRUE)    printf("The Optimized Blitting Time was %lu Milliseconds\n",milli);  else    printf("The Non-Optimized Blitting Time was %lu Milliseconds\n",milli);  return(milli);}