Or just use GetTickCount which is most common because it is accurate up to 1ms.