有一个类似的函数:
#include <time.h>
void wait( unsigned long duration)
{
long now=clock(),after=0;
while( after - now == duration)
{
after = clock();
}
}
#include <time.h>
void wait( unsigned long duration)
{
long now=clock(),after=0;
while( after - now == duration)
{
after = clock();
}
}