#include "atlstr.h"
#include <time.h>
#include <Windows.h>
void OutputDebugPrintf(const char* strOutputString,...)
{
char strBuffer[4096]={0};
va_list vlArgs;
va_start(vlArgs, strOutputString);
_vsnprintf_s(strBuffer, sizeof(strBuffer)-1, strOutputString, vlArgs);
va_end(vlArgs);
OutputDebugString(CA2W(strBuffer));
}
int main(int argc, char* argv[])
{
int i = 10;
clock_t tick1,tick2;
double dt;
tick1 = clock(); //ms
OutputDebugPrintf("I'm %d years old.\n", i);
Sleep(10);
tick2 = clock();
dt = (double) (tick2 - tick1);
OutputDebugPrintf("dt = %lf ms\n",dt);
while (1) {};
return 0;
}