_asm{nop}的意义是什么
dasha 2001-09-09 09:20:13 有程序如下:
void CMicroSecond::Initialize()
{
DWORD dwStart = 0;
DWORD dwStop = 0;
int nLoopSeed = 100000;
// make sure we get a seed count that will a millisecond value of about 100
do{
m_dwLoopCounter1 = 0;
dwStart = GetTickCount();
for ( int i=0; i< nLoopSeed; i++)
{
m_dwLoopCounter1++;
>> _asm{nop} //该行的意义
}
dwStop = GetTickCount();
nLoopSeed += 100000;
}while ( dwStop - dwStart < 50 );
m_dwLoopCounter1 = 0;
dwStart = GetTickCount();
for ( int i=0; i< nLoopSeed; i++)
{
m_dwLoopCounter1++;
>> _asm{nop} //该行的意义
}
dwStop = GetTickCount();
// loop counts per millisecond
m_dwLoopCounter1 = m_dwLoopCounter1 / (dwStop - dwStart);
m_nLoopCountPerMicroSecond = (int)m_dwLoopCounter1 / 1000;
}
其中,_asm{nop} 的意义是什么