I know this question has been asked few times over SO but none of them is really helping me out, so asking again.
I am using windows xp and running visual studio c++
This is working
#include <windows.h>
SYSTEMTIME startTime;
GetSystemTime(&startTime);
WORD startmillis = (startTime.wSecond * 1000) + startTime.wMilliseconds;
// Do some stuff
SYSTEMTIME endTime;
GetSystemTime(&endTime);
WORD endmillis = (endTime.wSecond * 1000) + endTime.wMilliseconds;
WORD millis = startmillis - endmillis ;